Closed Tom3652 closed 2 years ago
Can you try the below? We needed to add "-b .". I'll update Wiki.
"runDebug": [
"ssh", "foxtom@172.16.1.169", "/tmp/${appName}/${appName} -b ."
],
Thanks that fixed the error and i understand why now, it should pass the bundle
parameter as request when you run the app manually.
Well actually i have another error now :
[ERROR][ELinuxWindowX11(30)] Failed to open display.
[ERROR][InitializeEgl(52)] Failed to initialize the EGL display: eglGetError: EGL_NOT_INITIALIZED
[ERROR][ContextEgl(31)] Failed to choose EGL surface config: eglGetError: EGL_NOT_INITIALIZED
NoSuchMethodError: The getter 'port' was called on null.
I have done the export DISPLAY=:0
on another SSH session on my target device. Isn't it enough ?
I have done the export DISPLAY=:0 on another SSH session on my target device. Isn't it enough ?
I'm not sure, but I guess some settings for x11 are missing on your device.
Well if i run manually* the binary file on my device compiled with x11 backend it's working just fine :/
OK, so this error is a general problem when launching X11 apps on remote devices via SSH.
Hey @HidenoriMatsubayashi, do you mean that it's actually something you may have to fix if i understand correctly ?
Thanks !
Sorry for confusing you. Can you try launching any X11 apps on your device via SSH from your host PC?
Oh yes sure, this is actually working fine and this is how i do right now :
scp
the bundle
to my device The problem is that the debug is really slow because all of these steps... I wish i could use the flutter-elinux run
cmd to directly debug without having to do all these steps first :/
Okay, great. Then, can you try the following (set DISPLAY env before "/tmp/${appName}/${appName}")?
"runDebug": [
"ssh", "foxtom@172.16.1.169", "DISPLAY=:0.0 /tmp/${appName}/${appName} -b ."
],
Oh thank you it's working !
Indeed i was doing export DISPLAY=:0
on my device locally as well.
I have one more question sorry, i guess hot restart / hot reload are not supported since it's with SSH ? I have added more params (-w and -h) to the command.
Thanks again for your help you can consider this case closed :)
i guess hot restart / hot reload are not supported since it's with SSH ?
They are supported.
I feel stupid it's written. Thanks for your work on flutter-elinux it's a really amazing tool
I am trying to run on a remote device but i am getting the following error :
I have tried the port forwarding command manually in the terminal and everything seemed to be working fine by using a port like
1295
randomly.What i am doing wrong please ?