IBM Worklight 6.0 - Error accessing Worklight Server - ibm-mobilefirst

I am trying to run this sample code provided by IBM, but when I run it I get this error:
So I understand the HTTP 403, but where should I make neccesary changes to make this thing work? I saw this SO question: Jetty returning 403 Forbidden but no luck; I could not find that parameter anywhere in any file in my project.
Sometime earlier I got this error too Error 404: SRVE0190E: File not found: /

So lame, I had to deploy the adapter first then I deployed the native api, made neccessary changes voila I am good to go.

Related

The API request failed with the following error: 200 - OK

I administer my shared hosting through cPanel.
It is showing "The API request failed with the following error: 200 - OK." in red popup.
Everything is working fine. I can work on everything as usual, but still this pop?
When i login from another browser, the error is not shown.
How to get rid of it and why is this being shown?
How to get rid of this message was my question.
I had installed a chrom plugin that allowed me to use CORS.
After uninstalling this plugin, the error was gone.

WT 8-1: Getting HTTP GET on resource 'http://training4-american-api-maryumsiddique.us-e2.cloudhub.io:80/flights' failed: not found (404)

I'm doing mule 4 training and currently I'm on WT 8-1. I followed all the steps as they told and when I run the project it deployed successfully. But when I call "http://localhost:8081/american" from postman it gives me the following error.
Although the status is Started on Runtime Manager as below.
In API Manager the status is Active as well.
And I cannot figure out what's the issue. Can anyone please tell me what should I do?
Really appreciate the help 🙂
Likely your app deployed locally is not calling the right URL for the API deployed in CloudHub. Maybe the URL should be http://training4-...cloudhub.io/api/flights or something like it.

Could not GET gradle-3.1.3.pom android studio

I have problem with android studio, I was working with it after update to 3.1.3 i give below error:
Could not GET
'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.3/gradle-3.1.3.pom'.
Received status code 400 from server: Bad Request
I could download this file manually but android studio can't.
I test several way and use proxy but I can't get answer.
At last today i could solve problem, this error related to your connection i could solve this with proxy setting. google filter our Iran IP and could detect some proxy and you must use good proxy to pass it.
I'm getting the thing, but with a 407 error.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.3/gradle-3.1.3.pom'. Received status code 407 from server: Proxy Authentication Required
"I could download this file manually but android studio can't.
I test several way and use proxy but I can't get answer."
Same here.

Cannot Direct Update after fixpack WL 6.1.0.1

after the fixpack in subject, i cannot manage to direct update my application.
It notify me that there is a new version available, but when i hit Update it keeps saying that the download failed (both on iOS and Android).
I attached my android to adb and i noticed those lines in the console:
Authentication error: Unable to respond to any of these challenges:
{wl-composite-challenge=WWW-Authenticate: WL-Composite-Challenge}
java.io.IOException: Error downloading update file The following
message has been received from the server instead of the expected
application update zip file: HTTP/1.1 401 Unauthorized
/-secure-{"challenges":{"wl_deviceNoProvisioningRealm":{"token":"1or0tj7gnoev1rn06s188j4u9h"},"wl_antiXSRFRealm":{"WL-Instance-Id":"np8c8o3c4dk1k7s79i2ikddfab"}}}/
at
com.worklight.androidgap.plugin.WebResourcesDownloaderPlugin$WebResourcesDownloader.downloadZipFile(WebResourcesDownloaderPlugin.java:364)
To complete the information I deployed the IBM_Worklight_Console with no security role in its web.xml and we have Worklight 6.1.0.1 installed on WAS Network Deployment 7.0.0.23 running AIX.
Before the fixpack, everything worked well.
Thank you
EDIT: here you can see my application-descriptor.xml and my server configuration:
I forgot about this stack, however I found the problem.
When I open my application, the WL Framework asks for new available update. In the same time, my application ask an adapter for some data, before the WL server can response about the Update. So if it arrives first the response of my adpater, then the Update response will contain a different requestID causing a 403 forbidden.
I don't know if I explained it clearly, however the temporary fix is to put updateSilently: true, not disturbing the direct update.

IBM Worklight - Error 405 HTTP method POST is not supported by this URL

I've encountered a problem during development.
When the adapter is tested from within Eclipse ("Invoke Worklight procedure"), it does its job perfectly.
On the contrary, when the adapter is called from the app, it doesn't work. I receive the following error:
Error 405 HTTP method POST is not supported by this URL
I've noticed a strange thing. When the adapter is called from the test procedure the URL seems correct (/apps/services/api/...) In the other case, Worklight puts a worklight prefix (/worklight/apps/services/api/...) when it makes the call. Hence the URL cannot be reached.
Here Worklight Studio - error http 405 when connecting to mobile URL provided by Console I found a partial solution but it does not work.
Additional info
WL version is 5.0.6.
Application server is Tomcat 7.
Based on my experiments I found the problem.
Each worklight project has an application-descriptor.xml. Within it there is a tag that indicates the WL server root URL.
Since I've taken the project from another source, I've simply noticed that it was configured as
<worklightServerRootURL>http://sampleDomain/worklight</worklightServerRootURL>
where sampleDomain is only a placeholder for the real one.
Now it is configured like
<worklightServerRootURL>http://${local.IPAddress}:8080</worklightServerRootURL>
to perform internal local tests.
Hope it helps.