Giter Club home page Giter Club logo

Comments (86)

adi6409 avatar adi6409 commented on August 11, 2024 1

Alright, Thank you very much for the support!

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Can you show me the PaperPlane logs (/logs/*.log file), and if possible the startup arguments for Docker

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

sure, im trying to run it via yarn, as for me port 3000 is occupied by mastodon. right now i shut mastodon down while im trying to run paperplane as it keeps defaulting to port 3000 instead of 7173.
1671700526608-v3.1.5-paperplane.log

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

i tried with different versions of paperplane as well.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

weird, can you try running it via Docker using the default 3000 port. You can use the --port local:docker flag to change the outgoing port for connections (in this case for you: --port 7173:3000)

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

so using the command:
docker run --name=paperplane -d -v ~/paperplane:/paperplane/data -p 7173:3000 ghcr.io/ijskoud/paperplane:v3
it says WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Oops, that's my fault for not adding a platform list. I am trying to build a dev instance now, it should be available in a couple of minutes.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

thanks! please let me know when it's available.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

ehh it's gonna take a bit longer than expected. For some reason prisma is doing some weird stuff. Will prob be able to provide you with one in a couple of hours if it doesn't work now

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

Alright! take your time! i'm now trying the dev package anyway. i know it won't work, but ill try using that docker image that lets you run anything on arm64

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

should be ready in a couple of minutes (hopefully)

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

as far as I know, once this build is complete you can download the dev version using: ghcr.io/ijskoud/paperplane:dev. If it failed, than I will have to look at it tomorrow.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Well looks like it failed once again, will work on it tomorrow if I'm not too busy with other stuff. Sorry for the inconvenience

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

You can download it now!

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

Thanks, testing.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

Screenshot 2022-12-22 at 17 04 05

Screenshot 2022-12-22 at 17 04 13

:/

shows 502 error, also showed that while trying with the docker amd64 image using the binfmt image.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

important to say i'm using the nginx config, while trying to access paperplane from the pi itself it just loops refreshing between err socket not connected and err empty response.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

changed port to 3000 in both command and .env. now it has the same 3 dots issue. attaching video.

Screen.Recording.2022-12-22.at.17.29.51.mov

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Can you change the internal PaperPlane port (the one in Docker, set in the .env file) to 3000?

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

Yup, changed and it now has the same original issue with the websocket error

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Oh F, can you show me the NGINX config?

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

NGINX is not the problem, tried without nginx directly using port 3000 and it still had the dots issue.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Ah alright

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

It could be an issue with your firewall, if you are using your own home network than your firewalls might block a ws connection.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

yeah i actually don't have a firewall, and i tried a few different networks and none work.
also just tried on my M2 macbook pro with the new docker image and it has the same issue!
probably forgot to mention it also had the same issue while running paperplane from the source using yarn.
Screenshot 2022-12-23 at 8 41 10

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

interestingly enough, when i run using yarn dev i get this error on the dashboard and index page:
Screenshot 2022-12-23 at 9 10 28

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

that is a React error and shouldn't break the websocket stuff.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

yes, but the websocket works on yarn dev. when i run using yarn dev the websocket works and if i go to /login and type username and passwords i get the green notification it redirects me to the dashboard and shows this.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

oh that's interesting

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

yup

btw i went to the useAuth.tsx file and swapped the if and the return, so instead of

	const getProtocol = () => {
		const env = process.env.NEXT_PUBLIC_SECURE;
		if (env && env === "false") return "ws://";

		return "wss://";
	};
i put:
		const getProtocol = () => {
		const env = process.env.NEXT_PUBLIC_SECURE;
		if (env && env === "true") return "wss://";

		return "ws://";
	};

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Ah you beat me too it. I was about to tell you that I found the issue yea

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

yeah, but even after the change and running yarn build it has the same issue.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

It is working as expected, it only didn't work for you in the local environment because you didn't set the NEXT_PUBLIC_SECURE var in .env

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

hmmmmm

in the guide it said SECURE

might be a good idea to attach my .env here, without the generated key:

NAME_TYPE="name"
PORT=3000
SECURE=false

(it has port 3000 only for the testing and then i'll switch to 7173)

ill change to NEXT_PUBLIC_SECURE, run yarn build and ill let ya know.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

just saw that for some reason the SECURE variable does not really want to work so I will have to find a fix for that.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

nope didn't work for me ;/

i have two .env files because i dont know which one works, i have one in . and one in ./data. i changed both to include NEXT_PUBLIC_SECURE=false but still error 1006 after running yarn build and yarn start

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Yea it has something to do with a env set issue. I am working on a fix

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

A fix should be ready now, if you run git pull and start the dev or prod version everything should work again.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

i'll test now, thanks

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

now it shows this.
Screenshot 2022-12-23 at 9 49 56

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

can you show me the paperplane logs pls

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

Screenshot 2022-12-23 at 9 51 36

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

oh shit im stupid its a database problem

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

your data.db file is missing

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

forgot to create the data folder

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

you can run yarn prisma db push to fix it.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

ended up copying the db file from the other fresh install to data. back to square one :/
Screenshot 2022-12-23 at 9 53 37

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

only now it doesnt even connect to websocket while using yarn dev as well

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

can you clear your Chrome/FireFox cache, your dist folder and your .next folder. Probably cached javascript being annoying

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

I also published a Docker Dev version, you can try that one as well if you like.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

tried deleting the folders and clearing cache, still nothing with yarn start. with yarn dev, however, it worked! i logged into the dashboard. what should i try next?

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Oh then you probably didnt run yarn build did you?

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

i did

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

also, forgot to mention after everything works i'll upload it to my raspberry pi which uses https.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

i did

hmmmm

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

oh wow correct, weird. Worked for me the first time but now it seems to stop again as well

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

oh oops. Just realized that you are supposed to run node . and not yarn start.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

after yarn build?

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

yup that worked. ill now try with https

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

yep, if you run node . now it starts the Application correctly. yarn start only starts the front-end (the dashboard) and not the server

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

yup that worked. ill now try with https

Awesome!

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

whoops, nginx gives error 502. attac
hing config, paperplane says listening on port 7173
default.txt

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Why do you have a two servers for the same app???

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

i dont, i performed the tests on my macbook and i am trying to deploy to the raspberry pi.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

afaik you only need one unless, the 80 if ssl is handled by for example Cloudflare and 443 if its handled on the server by for example LetsEncrypt

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

idk, i used certbot to generate the ssl certificate, but when i tried deploying paperplane a few days ago i managed to get to the non-working paperplane from the domain with the exact same config.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

hmm, seems to be working now, but the paperplane logo is missing when accessing from the domain

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

Yea I noticed that aswell, but I believe that is a browser issue or something cuz the file is still accessible and can be found in the public folder

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

and the websocket fails to connect on https. same error 1006.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

wait wtf i dont have paperplane running how is it working

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

wait wtf i dont have paperplane running how is it working

probably an incorrectly stopped application still running in the bg

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

yeah i am trying to run it with pm2 but it is freaking out. i just rebooted the pi, now waiting for it to boot up and ill keep you updated.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

same ws error, probably because pm2 command is wrong. ill try using docker

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

with docker it just has the connection refused issue, even while trying to access from localhost.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

the port is not set correctly in that case

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

nope, lsof -i :7173 says docker, paperplane logs say 7173, web browser says connection refused or 502 if accessed from nginx

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

7173:7173 or just :7173, if it's the last one than the ports aren't setup correctly

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

i ran the command sudo docker run --name=paperplane -d -v ~/paperplane:/paperplane/data -p 7173:3000 ghcr.io/ijskoud/paperplane:dev

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

if everything worked on your local devices but doesnt on your Rasp Pi then you NGINX config or something like that must be incorrectly configured.

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

on my macbook i only tried the yarn method, without docker. should i try running docker run --name=paperplane -d -v ~/paperplane:/paperplane/data -p 7173:7173 ghcr.io/ijskoud/paperplane:dev on the pi? notice i changed 7173:3000 to 7173:7173

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

that doesn't work unless you change the internal PaperPlane port from 3000 to 7173 too. And if you did that, you will prob get the same output

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

so what should i do?

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

everything outside of PaperPlane while running paperplane is out of my workfield, I believe the ws issue is fixed now (unless you tell me otherwise) so either fix your NGINX if that is incorrectly configured or run it on another platform

from paperplane.

adi6409 avatar adi6409 commented on August 11, 2024

ran docker run --name=paperplane -d -v ~/paperplane:/paperplane/data -p 7173:7173 ghcr.io/ijskoud/paperplane:dev, have the same issue with the websocket not working on https.

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

I cannot reproduce the https issue atm

from paperplane.

ijsKoud avatar ijsKoud commented on August 11, 2024

I am going to close this issue now, feel free to continue this thread if you need more support but the PaperPlane issue is resolved now.

from paperplane.

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.