Not Found Alert while using DWR on a AppFog deployed App - configuration

While implementinf an app with DWR, I succesfully deployed an app in "AppFog" but I noticed a problem. Inmediately after loading, an alert raise up with this message: "Not Found". I would like to know why is this hapenning and how I can solve this...
If this is cmplex and you kneed more info, I'll be around... Thankx

Related

Cannot GET /api/forge/oauth/callback

Im trying to test out this demo on my own windows machine: https://github.com/Autodesk-Forge/forge-bim360-clashissue
Ive successfully started had the template running with these commands.
npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
set FORGE_CALLBACK_URL=<<YOUR CALLBACK URL>>
npm run nodemon
Ive added a new app within the Forge My Apps interface.
Ive added the provisions for the the BIM 360 Account interface.
I can connect to my localhost, and when i press ALLOW to try to authenticate and login to the autodesk account, i get redirected to the following website with the following error:
http://localhost:3000/api/forge/oauth/callback?code=TOAq...
Cannot GET /api/forge/oauth/callback
How can i get past this error?
It looks like a configuration mismatch. You have configured the callback to be http://localhost:3000/api/forge/oauth/callback but according to https://github.com/Autodesk-Forge/forge-bim360-clashissue/blob/master/server/endpoints/oauth.endpoints.js#L72 your server actually expects the callback on a different URL: http://localhost:3000/api/forge/callback/oauth.

Keycloak authentication with Electron App

Hi I've been stuck on this for days! I'm trying to use keycloak to authenticate my electron app after converting my react app using this guide.
When I run 'npm run electron:dev' , keycloak redirects to the login page. However, when I run 'npm run electron:prod' this fails.
Logs from keycloak server shows:
Server:server-one] 08:58:31,575 WARN [org.keycloak.events] (default task-3) type=LOGIN_ERROR, realmId=codingpedia, clientId=my-ui, userId=null, ipAddress=127.0.0.1, error=invalid_redirect_uri, redirect_uri=file:///home/mycompany/john/projects/boilerplate-javascript-electron/app/build/index.html
Notice that the redirect_uri is 'file:///...' which I believe to be the cause of it.
I've also tried to change the below but it does not resolve the problem.
// import createHistory from 'history/createBrowserHistory';
import createHistory from 'history/createHashHistory';
Why is this working in dev but not in prod? Is there something I'm missing? Thank you in advance!
It works in dev probably because the "index.html" file is located in your computer (file:///home/mycompany/john/projects/boilerplate-javascript-electron/app/build/index.html).
This stackoverflow thread tells how to properly set the redirect_uri parameter, through the admin console.
Note: make sure you can remotely access your index.html in prod, using a browser or any other client tool (HTTP GET).

Heroku app: Error during WebSocket handshake: Unexpected response code: 200

I followed a tutorial on how to make a multiplayer tetris game, here is the repo:
https://github.com/Leftier/tetris
It worked just fine on localhost so I tried to deploy it in heroku (https://tetrixtest.herokuapp.com/ --ASD to move Q/E to rotate) but I get the following error:
WebSocket connection to 'wss://tetrixtest.herokuapp.com/' failed: Error during WebSocket handshake: Unexpected response code: 200
while trying to create the webSocket in this line (connection-manager.js line 14):
this.conn = new WebSocket(`wss://${window.location.hostname}:${window.location.port}`)
I don't know much about webSockets,
at first I thought that heroku was not able to handle websockets but that wasn't the case so I tried using the link directly as an argument instead of reading it from the browser but still the same issue.
I would like some clues/hints about why does this happens, I searched in google and github, but I only found issues related to socket.io
For me the solution was to turn on "Session affinity" by running this command heroku features:enable http-session-affinity
More info at https://devcenter.heroku.com/articles/session-affinity
Session affinity, sometimes referred to as sticky sessions, is a
platform feature that associates all HTTP requests coming from an
end-user with a single application instance (web dyno).

Google push notifications - DOMException: Registration failed - push service error

I am trying to enable push notifications on my website using VAPID keys.
When i include the gcm_sender_id and remove the applicationServerKey from the pushManager.subscribe method, it runs fine.
Only when i enable VAPID keys and remove the gcm_sender_id from manifest.json file. i get the foloowing error.
DOMException: Registration failed - push service error
I am using Chrome browser.
I encountered this error in Brave browser. By default, Google Services for push messaging are disabled in Brave. To enable this, open the following URL in brave:
brave://settings/privacy
After this, enable the flag "Use Google services for push messaging":
Source:
https://github.com/firebase/firebase-js-sdk/issues/3195#issuecomment-848036637
The applicationServerKey that i was using in the pushManager.subscribe method was somehow incorrect.
It worked when i regenerated the keys in node using the following module.
const webpush = require('web-push');
const vapidKeys = webpush.generateVAPIDKeys()
In my case,I was trying to run firebase messaging on a flutter web.
My Browser was BRAVE.
It always failed with an exception of firebase fcm registration push servic error.
I followed #Nicodemuz answer, but it didn't solve the issue. I get the same error.
The only solution was setting Google chrome as my executable.
Anyhow the issue is not with firebase or flutter, it's with the brave browser itself.

Error deploying polymerCli to firebase

I am learning polymer and firebase and I have a small proyect with polymerCli wich works fine localy (localhost) but when I deploy it to firebase I dont know why have this error: VM57 my-app.html:53 GET https://nutricion1-b22f8.firebaseapp.com/src/my-__.html 404 (Not Found)
does anyone know why this happend?
Thanks a lot