Play: Action Not Found - scala

I am trying to access a Play project from a browser.
Request:
http://localhost:9000/
Response:
Action Not Found
For request 'GET /'
These routes have been tried, in this order:
1 GET / controllers.WidgetController.index()
2 GET /widgets controllers.WidgetController.widgets()
Request:
http://localhost:9000/widgets
Response:
Action Not Found
For request 'GET /widgets'
These routes have been tried, in this order:
1 GET / controllers.WidgetController.index()
2 GET /widgets controllers.WidgetController.widgets()
I have tried adding and removing trailing slashes, but it did not help.
I have tried to sbt clean the project, but it did not help.
Any ideas what may be wrong here?

Related

How do use ionic 6 with Auth0 ionic sample

I am using the https://github.com/auth0-samples/auth0-ionic-samples/tree/main/angular and following the examples in the readme file to to letter
Allowed Callback URLs:
com.auth0.samples://XXXX/capacitor/com.auth0.samples/callback, capacitor://localhost, http://localhost, http://localhost:4200
Allowed Logout URLs:
com.auth0.samples://XXXXX/capacitor/com.auth0.samples/callback, http://localhost:4200
Allowed Origins (CORS):
capacitor://localhost, http://localhost
Allowed Web Origins:
http://localhost:4200
And it worked twice and then all further testing I received this error
Failed to launch 'com.auth0.samples://dev-zhh5r4vf5zhgl2w4.us.auth0.com/capacitor/com.auth0.samples/callback?code=XXXXX&state=OGhsemEyWmF3MXlrOHkyVjRsanRhOVVKZ1dNZjdSb0swMlc3OWUtVnZYOA%3D%3D' because the scheme does not have a registered handler.
Has anyone else received this error and what was the fix?

Bug? v12.0.4 Account Console loading

Is there a bug with respect to Keycloak v12.0.4 ?
It is hanging on 'Account Console loading ...'.
HTTP sequence on clicking 'Impersonate' on all realms below. NB: https://example.com/authjs/keycloak.js is a 404 NOT FOUND.
POST https://example.com/auth/admin/realms/master/users/3467c293-741d-4345-8e06-a2a17ea71458/impersonation HTTP/1.1
GET https://example.com/auth/realms/master/account HTTP/1.1
GET https://example.com/auth/realms/master/account/ HTTP/1.1
GET https://example.com/authjs/keycloak.js HTTP/1.1
GET https://example.com/auth/resources/d5e5y/account/keycloak.v2/welcome-page-scripts.js HTTP/1.1
Yes, you are right this is a bug that according to the Keycloak mailing list is currently being tracked by the following stories:
authjs/keycloak.js 404 NOT FOUND related stories;
Infinite loop logging as an user or impersonating an user as admin.
The authjs/keycloak.js 404 NOT FOUND error on 12.0.x is related to this bug https://issues.redhat.com/browse/KEYCLOAK-16709?jql=text%20~%20%22%2Fauthjs%2Fkeycloak.js%22%20ORDER%20BY%20lastViewed%20DESC - you just need a leading / on KEYCLOAK_FRONTEND_URL and it fixes it.

Pure Java REST API POST calls to Jenkins /reload or /restart always return status 403 forbidden, but work

I'm getting an Exception when running this, but Jenkins actually executes the requested action:
URL url = new URL("https://somehost.com/jenkins/quietDown");
HttpURLConnection c= (HttpURLConnection) url.openConnection();
c.setRequestMethod("POST");
c.setRequestProperty("Authorization", "Basic " + Base64.getEncoder().encodeToString(("user:apiToken").getBytes()));
c.getInputStream().close();
Exception:
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://somehost.com/jenkins/
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
at build.JenkinsClient.main(JenkinsClient.java:102)
Testing with Jenkins 2.164.3 and Java 8.
Setting this gets rid of the Exception:
connection.setInstanceFollowRedirects(false);
After hours I noticed how the stack trace contained a slightly different URL than the one I was posting to:
https://somehost.com/jenkins/
vs
https://somehost.com/jenkins/quietDown
It seems like Jenkins answers with a redirect (302 Found), which the HttUrlConnections follows by default to read from, which then for some reason caused that exception.
For the longest time, I tried to figure out a way to issue the POST request without calling connection.getInputStream(), but that seems to be the only call which actually triggers the request. If anyone knows a different way to issue a POST request with pure Java, please let me know.
I knew my URL and username:token stuff was correct because I tested with curl (which doesn't complain, even with the follow redirect option turned on):
curl -X POST https://somehost.com/jenkins/quietDown -u admin:token
curl -L -X POST https://somehost.com/jenkins/quietDown -u admin:token

How to get projects that I have permission to start in processmaker?

http://wiki.processmaker.com/3.0/REST_API_Designer#get_projects
this api return all projects in my workflow including that I have not involved in. Any way to get projects that I can start?
I was told "/api/1.0/workflow/light/start-case" would get the projects I involved, while "/projects" get all projects.
Well, you have to execute these steps, for example in Postman:
For Desktop
GET: {{url}}/{{workspace}}/oauth2/token
url: Your Site
workspace: Your Workspace
**Headers**
Authorization: Basic eC1wbS1sb2NhbC1jbGllbnQ6MTc5YWQ0NWM2Y2UyY2I5N2NmMTAyOWUyMTIwNDZlODE=
Content-Type: application/json
{
"grant_type":"password",
"username":"admin",
"password":"admin"}
Now that we already have the access_token we need to try it out in the next endpoints
GET: {{url}}/api/1.0/{{workspace}}/light/start-case
url: Your Site
workspace: Your Workspace
**Headers:**
Authorization: Bearer {{access_token}}

openui5 sdk test suite page fails with response error 404

Using either locally installed openui5-sdk-1.18.10 or here https://openui5.hana.ondemand.com/#resources/testsuite/welcome.html, when trying to access the testsuite, the response is HTTP Status 404 - Resource could not be found!
It seems the referenced link is currently invalid. Try the following instead:
SAPUI5:
https://sapui5.hana.ondemand.com/sdk/resources/testsuite
OpenUI5:
https://openui5.hana.ondemand.com/resources/testsuite