Open nguyenlkdn opened 3 months ago
Already tried start VM Dart on Host PC to connecting VM Server URL
Please ensure that you have set forwardPort and disable all proxy settings.
See https://github.com/sony/flutter-elinux/wiki/Remote-target-devices#flutter_custom_devicesjson-example
Please ensure that you have set forwardPort and disable all proxy settings.
See https://github.com/sony/flutter-elinux/wiki/Remote-target-devices#flutter_custom_devicesjson-example
{
"custom-devices": [
{
"id": "gridania-pvt1",
"label": "Gridania Pvt 1",
"sdkNameAndVersion": "ion-imx-wayland",
"enabled": true,
"platform": "arm64",
"backend": "wayland",
"ping": [
"ping", "-w", "500", "-c", "1", "192.168.7.1"
],
"pingSuccessRegex": "ttl=",
"install": [
"scp", "-r", "${localPath}", "root@192.168.7.1:/tmp/${appName}"
],
"uninstall": [
"ssh", "root@192.168.7.1", "rm -rf \"/tmp/${appName}\""
],
"runDebug": [
"ssh", "root@192.168.7.1", "XDG_RUNTIME_DIR=/run/user/0 /tmp/${appName}/${appName} -b ."
],
"stopApp": [
"ssh", "root@192.168.7.1",
"ps aux | grep \"/tmp/${appName}\" | grep -v grep | awk '{print $2}' | xargs kill"
],
"forwardPort": [
"ssh", "-o", "ExitOnForwardFailure=yes",
"-L", "127.0.0.1:${hostPort}:127.0.0.1:${devicePort}", "root@192.168.7.1"
],
"forwardPortSuccessRegex": "Linux"
}
]
}
I have no any proxy configured now.
saydi@Precision-3571:~$ echo "$http_proxy"
saydi@Precision-3571:~$ echo "$https_proxy"
saydi@Precision-3571:~$ env | grep proxy
saydi@Precision-3571:~$
I connect with my target board over Ethernet Port
Target: 192.168.7.1
Host: 192.168.7.2
Look at my logs:
trant.java
[ +19 ms] Launching lib/main.dart on eLinux in profile mode...
[ +1 ms] Uninstall sample from gridania-pvt1.
[ ] executing: ssh root@192.168.7.1 rm -rf "/tmp/sample"
[ +229 ms] Uninstallation Success
[ +2 ms] Install sample (build/elinux/arm64/profile/bundle) to gridania-pvt1
[ ] executing: scp -r build/elinux/arm64/profile/bundle root@192.168.7.1:/tmp/sample
[+2970 ms] Installation Success
[ +1 ms] Launch sample.name on gridania-pvt1
[ +317 ms] VM Service URL on device: http://127.0.0.1:43621/d4EXYYZKy2c=/
[ ] executing: ssh -o ExitOnForwardFailure=yes -L 127.0.0.1:43621:127.0.0.1:43621 root@192.168.7.1
PortForward already corrected.
$ flutter-elinux run -d raspberry-pi4
Launching lib/main.dart on eLinux in debug mode...
Uninstall sample from raspberry-pi4.
hidenori@192.168.0.10's password:
Uninstallation Success
Install sample (build/elinux/arm64/debug/bundle) to raspberry-pi4
hidenori@192.168.0.10's password:
Installation Success
Launch sample.name on raspberry-pi4
hidenori@192.168.0.10's password:
hidenori@192.168.0.10's password:
Syncing files to device eLinux... 202ms
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
💪 Running with sound null safety 💪
An Observatory debugger and profiler on eLinux is available at: http://127.0.0.1:43237/xd6sW5hdEoE=/
Activating Dart DevTools... 1,830ms
The Flutter DevTools debugger and profiler on eLinux is available at:
http://127.0.0.1:9100?uri=http://127.0.0.1:43237/xd6sW5hdEoE=/
Regarding to your trial on Rpi, i just confused about why did your target board already installed "Dart DevTools" and it will be activated automatically while executing flutter app.
or after "💪 Running with sound null safety 💪"
It is being executed on Host???
Practice done already, with below notes:
I need to attach "--debug-url" manually after application started
Target Device:
LD_LIBRARY_PATH=/usr/share/flutter/3.19.3/profile/lib/ flutter-client --bundle=/usr/share/flutter/ion-hmi/3.19.3/profile/
flutter: The Dart VM service is listening on http://127.0.0.1:38867/LdVG8OhkIx8=/
Host PC:
Ex: in my case is ssh -o ExitOnForwardFailure=yes -L 127.0.0.1:38867:127.0.0.1:38867 root@192.168.7.1
flutter-elinux attach --debug-url=http://127.0.0.1:38867/LdVG8OhkIx8=/
Syncing files to device eLinux... 6.2s
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on eLinux is available at: http://127.0.0.1:43373/-fXmCK4fbG0=/
The Flutter DevTools debugger and profiler on eLinux is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:43373/-fXmCK4fbG0=/
Results on Web Browser
Practice on Flutter-eLinux release 3.9.13. Thank you!
@HidenoriMatsubayashi I am not sure why did my environment haven't started Devtools automatically as your practiced
You should use The Flutter DevTools debugger and profiler on eLinux is available at: http://127.0.0.1:9100?uri=http://127.0.0.1:43373/-fXmCK4fbG0=/
one on Host PC.
I'm not sure what your issue is here... See also: https://github.com/sony/flutter-elinux/wiki/Debugging-with-DevTools
I've confirmed that flutter-elinux
with a remote-device works fine.
flutter-elinux version: 3.19.4 Remote device: Rapsberry-Pi5
$ flutter-elinux run -d raspberry-pi5 --profile
Launching lib/main.dart on eLinux in profile mode...
Uninstall sample from raspberry-pi5.
hidenori@192.168.10.24's password:
Uninstallation Success
Install sample (build/elinux/arm64/profile/bundle) to raspberry-pi5
hidenori@192.168.10.24's password:
Installation Success
Launch sample.name on raspberry-pi5
hidenori@192.168.10.24's password:
hidenori@192.168.10.24's password:
Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on eLinux is available at: http://127.0.0.1:39075/I6EFzjm6EeE=/
The Flutter DevTools debugger and profiler on eLinux is available at:
http://127.0.0.1:9100?uri=http://127.0.0.1:39075/I6EFzjm6EeE=/
Ya i mean is we able to connect for debugging on target already after we attach debugger manuallly
flutter-elinux attach --debug-url=<Link to VM Service on target board>
I just concerned is why did it is not started automatically on our environment. Maybe it is environment issues, thank for your confirmed.
Please try the followings to break down the issue.
I'll close this issue as there is no additional update/comment.
Re-opening.
Pasting what i had in the other issue
Looked through a bit of the other issues but haven't been able to resolve what I am seeing.
flutter-elinux run -d v1200
Launching elinux/flutter/main.dart on eLinux in debug mode...
Uninstall vis_vision_app from v1200.
Uninstallation Success
Install vis_vision_app (build/elinux/arm64/debug/bundle) to v1200
Installation Success
Launch vis_vision_app.name on v1200
The discovery uri never shows up in the regular log. But if i run with -v
[+5191 ms] Installation Success
[ ] Launch vis_vision_app.name on v1200
[+1231 ms] VM Service URL on device: http://127.0.0.1:40937/MWJ-2vYYMDg=/
[ +1 ms] executing: ssh -o ExitOnForwardFailure=yes -L
127.0.0.1:40937:127.0.0.1:40937 ccs@10.134.182.10
Going to that url I get this.
This VM does not have a registered Dart Development Service (DDS) instance and is not currently serving Dart DevTools.
Other info, I am cross building from x64 to arm64 using custom sdk and yocto.
I used that url from the verbose log and did the same process with running the flutter-elinux attach
from my development machine and I was able to get dev tools. Not sure why its not running the attachment by itself. Here is the forwardPort for this custom device.
"forwardPort": [
"ssh", "-o", "ExitOnForwardFailure=yes",
"-L", "127.0.0.1:${hostPort}:127.0.0.1:{$devicePort}", "ccs@<display IP>"
],
"forwardPortSuccessRegex": "Linux"
"-L", "127.0.0.1:${hostPort}:127.0.0.1:{$devicePort}", "ccs@
"
Typo: {$devicePort} => Correct one is ${devicePort}
Good catch, but that is also how i have it in my custom devices. Working between different devices
When attempting to connect to the VM service URI output by the Flutter engine in the context of a custom embedder, users may encounter the following error:
This VM does not have a registered Dart Development Service (DDS) instance and is not currently serving Dart DevTools.
Platform:
Flutter elinux release 3.13.0
Flutter target devices:
Step to Reproduce: 1) flutter-elinux create sample 2) cd sample 3) flutter-elinux pub get 4) flutter-elinux run -d gridania-pvt1 --profile -v
Result on Web-browser: debug and profile modes are the same result