MIgrate outside docker

Looks like you are using Redis in Wappler? That cannot be used without Docker.
Maybe try removing those packages?

1 Like

Ok. But if I remove redis I would be able to save the logged session? How could I remove redis?

You can use redis outside of docker. You just need to install it on the target (including local) and set the redis location in your target settings.

Here’s a post on doing so for centos 8

2 Likes

Try switching to Docker target, toggle Redis to off.
Then try adding a local dev target.
And then, you can follow Ken’s tutorial to setup Redis externally.

1 Like

I manage to solve it, thanks both @sid (as always) and @mebeingken

Here is what I did:

  • Used docker to deploy a Redis server inside it, binding docker’s inner port to my Mac (using port 3350) in order to make Redis available for my NodeJS app.

  • Changed the target to local NodeJS and then configured redis on wappler

image

Apparently, it’s working.

1 Like

Now I’m having trouble with my db connection.

I’ve migrated the docker’s db to my mamp mysql server. It connects correctly but when I load the app I get this error:

server-connect:server Got error? Error: getaddrinfo ENOTFOUND db
server-connect:server at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) {
server-connect:server errno: -3008,
server-connect:server code: ‘ENOTFOUND’,
server-connect:server syscall: ‘getaddrinfo’,
server-connect:server hostname: ‘db’,
server-connect:server fatal: true
server-connect:server } +11s

This is my configured db module on Wappler:

I would have thought making puppeteer work would be less of a headache than changing your whole landscape and deployment process.

“Estás matando moscas a cañonazos” or cracking a nut with a sledgehammer :smiley:

1 Like

Yeah… I can’t believe it, but I was struggling to create PDFs using Wappler and once an option appears (thanks @sid for that), I’m having all this trouble to make it work…

Besides PDF creation, Puppeteer is an excellent module for my app. Hope it’s worth it…

1 Like

I believe it’s a Wappler bug because I should be able to use NodeJS and Docker as two individual targets, right?

Imagine if I need to host my app to a non-Docker server, I should go through all this trouble?

I need @patrick or @George more than ever.

Not sure what you mean - Nodejs is a server model, Docker is a hosting option.

We have just added Puppeteer to a Docker Project running Node, and its dependencies, with no issues (on Windows 10). So not sure what happened with your Project @salvuccicarlos? Attached terminal output below:

Maybe it’s a MAC issue?

I don’t think is a Mac issue. How could you add puppeteer to the existing docker proyect created using wappler?

Yes, I understand that. But I can’t understand how could a proyect running on docker won’t run in the host.

Now it’s throwing me this error:

Navigate to your project folder in terminal and type

npm i puppeteer-core

It should now be installed and added to your package.json file

Not the solution, the error persists. Please check this topic: HTML to PDF Action - NodeJS & PHP [Open Source]

I get this error after installing puppeteer-core:

message: “Failed to launch the browser process!\n/opt/node_app/node_modules/puppeteer/.local-chromium/linux-869685/chrome-linux/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n
stack: “Error: Failed to launch the browser process!\n/opt/node_app/node_modules/puppeteer/.local-chromium/linux-869685/chrome-linux/chrome: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n\n at onClose (/opt/node_app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:194:20)\n at Interface. (/opt/node_app/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:184:68)\n at Interface.emit (events.js:326:22)\n at Interface.close (readline.js:416:8)\n at Socket.onend (readline.js:194:10)\n at Socket.emit (events.js:326:22)\n at endReadableNT (_stream_readable.js:1241:12)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)”
status: “500”

Are you just installing the core Puppeteer package or trying to install Puppeteer and its Chrome component? We just used the core has have no need for the full Chrome version… May be where the issue is?

I believe I need the chrome component because I need to export a HTML to PDF using puppeteer

Is this so @sid

If you check the topic where @sid created the custom module, I need the full puppeteer package working.

Topic: HTML to PDF Action - NodeJS & PHP [Open Source]

Sorry meant to tag Sid not Jon…

1 Like