Closed tobiasdiez closed 1 year ago
Hey @tobiasdiez :wave:
For the second part of your issue (throw new Error("Dialect needs to be explicitly supplied as of v4.0.0");
), the error is raised by Sequelize. Running only yarn node .\server\adminsimple.js
will not read the content of .env
file by default.
So, for the mountOnStandalone
version of your code, you should be able to make it run via the usage of the dotenv
package. Let me know if that's the case 🙏
For the first part of the issue (About the authentication), I've forwarded this to the team in charge of this topic, that should answer you shortly 👍
Hi,
I have been looking through the server logs and couldn't find any error or timeout on the authentication routes (max is a couple seconds). Could you please retry and see if the issue persists. If so, could you please provide a timestamp of the attempt so that we can see if the error shows up in the server logs.
Thanks
Thanks @jeffladiray and @realSpok for your help!
First of all, of course, loading the env
file fixed the mountOnStandalone
issue. So that's resolved. I think, I've also found a solution to my original problem. It was a combination of async promises and connection errors being hidden by nuxt. So sorry for the noise.
I think however that there should be a timeout on the superagent request. What do you think?
I guess we missed this answer :'(
i've created a ticket to add a timeout on those superagent calls as it would have been easier to understand the issue indeed.
I'm closing this, as the global issue is resolved on your end, and we'll let you know once the timeout is added on those calls.
Thanks for your feedback 🙏
Expected behavior
Starting the agent with
agent.start()
works.Actual behavior
However, it hangs forever.
Failure Logs
There are no relevant logs printed. I tried to debug it and found out that execution of these promises never finishes: https://github.com/ForestAdmin/agent-nodejs/blob/dd3a18cb9c168381c52e7c70c511e3b9391758f4/packages/agent/src/agent.ts#L150. I'm not exactly sure which route is the issue, but I think it is the authentication route.
In fact, looking at https://github.com/ForestAdmin/agent-nodejs/blob/dd3a18cb9c168381c52e7c70c511e3b9391758f4/packages/forestadmin-client/src/utils/server.ts#L18-L24, there are no timeouts specified and thus I think it waits forever for a response: https://ladjs.github.io/superagent/#timeouts
But this doesn't really explain why there is no response from the auth server in the first place...
Context
The code I'm using can be found at https://github.com/JabRef/JabRefOnline/pull/1345. Just follow https://github.com/JabRef/JabRefOnline#getting-started to setup the local db, and then run
yarn dev
which starts the server. After that the forestadmin backend should be available at http://localhost:3000/_admin, but actually the server does not respond.I've also tried to play around with the standalone mount:
yarn node .\server\adminsimple.js
. But this fails with