okta / samples-js-react

React Auth SDK sample
Other
174 stars 257 forks source link

at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" #262

Open poddb opened 2 years ago

poddb commented 2 years ago

Getting the following error when I npm start:

at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=my-app.herokuapp.com request_id=ID a fwd=".,*," dyno= connect= service= status=503 bytes= protocol=https

I can see that this in fileserver.js held in samples-js-react/node_modules/selenium-webdriver/lib/test/:

var app = express();

app.get('/', sendIndex) .get('/favicon.ico', function(req, res) { res.writeHead(204); res.end();

I've tried looking around the past day to see if I can find out what is causing it but nothing I try has resolved it.

Would appreciate some assistance as I am quite new to this and it might be a very simple fix but I can't see the wood for the trees

jaredperreault-okta commented 2 years ago

@poddb which sample are you trying? okta-hosted or custom-login?

poddb commented 2 years ago

@jaredperreault-okta okta-hosted

poddb commented 2 years ago

@jaredperreault-okta have you got any idea of what I can try?

jaredperreault-okta commented 2 years ago

@poddb are you attempting to run this locally? Or on heroku?

I just did a fresh install and the sample worked for me (locally)

git clone https://github.com/okta/samples-js-react.git
cd samples-js-react
npm install
cd okta-hosted
npm start
# browser to localhost:8080
poddb commented 2 years ago

@jaredperreault-okta I'm doing it via heroku. I can get the app running ` $ npm start

@okta/samples-js-react@3.0.0 start node ./heroku/server.js

App is live on port 8080! ` But when I try and sign into the app in heroku I get Application error

and in the logs I see

2022-06-06T08:53:08.444061+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=*******.herokuapp.com request_id=a440e52c-2c51-4fd2-b751-2f938597684c fwd="**.*.***.***" dyno= connect= service= status=503 bytes= protocol=https 2022-06-06T08:53:19.201453+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=*******.herokuapp.com request_id=0b5898ff-474c-4ef6-8654-473e3276fcb7 fwd="**.*.***.***" dyno= connect= service= status=503 bytes= protocol=https

jaredperreault-okta commented 2 years ago

Does it crash if you go to https://*******.herokuapp.com/okta-hosted-login?

poddb commented 2 years ago

@jaredperreault-okta

Screenshot 2022-06-06 at 16 58 05

I get this

poddb commented 2 years ago

@jaredperreault-okta I have been looking through the logs and have spotted this, though I am not sure how I would go about fixing it:

2022-06-14T08:13:45.533806+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:778:27) 2022-06-14T08:13:45.533806+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) 2022-06-14T08:13:45.533807+00:00 app[web.1]: at node:internal/main/run_main_module:17:47 { 2022-06-14T08:13:45.533807+00:00 app[web.1]: code: 'MODULE_NOT_FOUND', 2022-06-14T08:13:45.533808+00:00 app[web.1]: requireStack: [] 2022-06-14T08:13:45.533808+00:00 app[web.1]: }

jaredperreault-okta commented 2 years ago

@poddb I created an internal ticket to look into this. The sample works fine locally, so it might have something to do with deploying to Heroku

Internal Ref: OKTA-506911

poddb commented 2 years ago

Hi @jaredperreault-okta was there any update on the ticket?

jaredperreault-okta commented 2 years ago

@poddb This ticket is in our current sprint. Updates to follow

Zuker-nie commented 1 year ago

any updates on the ticket?

jaredperreault-okta commented 1 year ago

@Zuker-nie I believe this issue was fixed in https://github.com/okta/samples-js-react/pull/267. Are you still experiencing this issue?

poddb commented 1 year ago

Hello,

This project was put on hold for the time being so I haven't been able to test anything. I will be sure to comment when we pick up the project again in the new year.

On Mon, 19 Dec 2022 at 13:37, Jared Perreault @.***> wrote:

@Zuker-nie https://github.com/Zuker-nie I believe this issue was fixed in #267 https://github.com/okta/samples-js-react/pull/267. Are you still experiencing this issue?

— Reply to this email directly, view it on GitHub https://github.com/okta/samples-js-react/issues/262#issuecomment-1357686653, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQZEX37VVAL5GW2PGIULODWOBQJXANCNFSM5W2E2SPA . You are receiving this because you were mentioned.Message ID: @.***>

-- Kind Regards,

Padraigh Basquille (he/him they/them) Engineer, IT & Security 8am - 6pm (M, T, W, F)

Learn more about Shout https://giveusashout.org/ - Click here to volunteer with us https://crisistextlineuk.tfaforms.net/24 Mental Health Innovations (legal name of Shout) is a registered charity, number: 1175670

trobinuk commented 1 year ago

I am facing the same issue. When the app is hosted locally it runs But when deployed to Heroku it shows the below error. at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=apitestrisk12.herokuapp.com request_id=5e73a635-20a4-4922-b280-477b140a596a fwd="144.167.230.11" dyno= connect= service= status=503 bytes= protocol=https

testruncoder commented 1 year ago

I've got the exactly same error message as trobinuk described. The python code was running well on the Heroku until some time last week when I tried to deploy an updated code with minor changes. Even when I now use the code that was previously deployed with success, the same error message appeared. It appears that something has changed on the Heroku server.

lalithadsuresh commented 1 year ago

Same - I am currently trying to figure it out. I believe it has to do with how the directories are organized.

iphaminh commented 10 months ago

got the same issue for my deployment

ricpar123 commented 7 months ago

same problem for my deployment

oondels commented 4 months ago

has anyone solved the problem?

ccorreia-rhaeos commented 3 months ago

same problem

eayand commented 3 months ago

same problem here

mimi-tech commented 1 month ago

I had the same issue but I resolved mine by changing this in my package.json file "scripts": { "start": "nodemon index.js" },

to

"scripts": { "start": "node index.js" },