Code Monkey home page Code Monkey logo

Comments (8)

OzarkShepherd avatar OzarkShepherd commented on August 20, 2024

Firefox when I click on submit for random usernames gives a NetworkError when attempting to fetch resource, and the terminal says the below:

Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:259:15)
at ReadStream.onclose (node:internal/streams/end-of-stream:117:38)
at ReadStream.emit (node:events:339:22)
at emitCloseNT (node:internal/streams/destroy:169:10)
at processTicksAndRejections (node:internal/process/task_queues:79:21)

from gramps-web.

DavidMStraub avatar DavidMStraub commented on August 20, 2024

Can you please try again? It happens e.g. when the backend cannot be reached. Since the backend is hosted on a free Heroku instance, it goes to sleep after 30 min of inactivity and then always takes some time to wake up again. So it could help trying again after one minute.

Of course, it's not good that there is no informative error message.

from gramps-web.

OzarkShepherd avatar OzarkShepherd commented on August 20, 2024

Thank you for responding. In this instance, the backend is supposed to be the Gramps webapi installed on the same VM, running on port 5555. I suspect I misconfigured the webapi if this is the behavior when the frontend can't reach the backend. Is Gramps.js configurable?

from gramps-web.

DavidMStraub avatar DavidMStraub commented on August 20, 2024

Sorry, I misread your question, I thought this was about the demo server.

By default, the frontend looks for the backend on localhost:5555. Check if you can open any of the API endpoints without authentication (e.g. http://localhost:5555/api/metadata/).

from gramps-web.

DavidMStraub avatar DavidMStraub commented on August 20, 2024

Is this still an issue?

from gramps-web.

OzarkShepherd avatar OzarkShepherd commented on August 20, 2024

It is still an issue, but it appears to be an issue with getting the webapi to work with apache2.

from gramps-web.

OzarkShepherd avatar OzarkShepherd commented on August 20, 2024

the result of curl http://localhost:5555/api/metadata is a 404 error. Same 404 error with curl http://localhost:5555. The webapi is started with gunicorn -e GRAMPS_API_CONFIG=/usr/local/www/gramps-webapi-0.1/config.cfg --bind localhost:5555 gramps_webapi.wsgi:app. I suspect it is an issue with getting apache2 to work with the webapi, specifically configuring python3 apps to be configured properly with apache2.

I was trying to get it to work with apache2 instead of nginx because I already set up my home server to work with apache2 and didn't want to switch the entire thing to nginx when the webapi reached the production stage.

from gramps-web.

DavidMStraub avatar DavidMStraub commented on August 20, 2024

I'm not sure I understand what Apache has to do with this. If you start gunicorn, you should be able to curl the endpoints from within the VM.

I'll close this issue just because it's not caused by Gramps.js, but feel free to continue posting below or to open an issue at Gramps Web API.

from gramps-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.