[Quasar/Cordova] Random error on physical device "net::ERR_ADDRESS_UNREACHABLE"
May be this issue is related to Cordova rather than Quasar, but someone may have encountered this issue too, so any help is welcomed .
After building and deploying my app to my physical device (“quasar dev -m cordova -T android”), I sometimes get a “net::ERR_ADDRESS_UNREACHABLE” error, saying that my PC’s local address couldn’t reached.
I don’t know what is trigerring this error, since it sometimes disappear once I re-deploy my app. Sometimes I have to wait few hours…
Is there any network config that can fix this issue ?
I already tried to deactivate my firewall, but it does not seem to work.
Thanks for your help
@EmmanuelJego quasar dev is not deployment, it’s
dev, if you want to test your apk without attaching your mobile device to your dev pc, then run
quasar build -m android --debugnotice the
--debugflag, it will create a debug signed apk that you can install into your device.
@metalsadman Thanks for your response!
Sorry I wasn’t clear, when I said “deploying” I didn’t mean deployment in the “build an APK” meaning, but “send the debug app to my device”, with my device wired to my PC. As you can imagine, I don’t want to build an APK each time I change a line of code to test my app.
So I don’t think that I’m wrong using the “quasar dev -m cordova -T android” command there.
It just fails to connect to my PC’s local IP address sometimes. And I can’t figure out why.
@EmmanuelJego non that I can think of other than a loose usb connection.
From my router settings, I added NAT/PAT rights in order to make my Android device able to access the 8080 port. It seems to work for now, may be it’s just luck, I’ll tell you if it finally didn’t fix my issue.
Well, it worked for few hours, but the issue finally came back.
@EmmanuelJego i’ve experienced that myself, it’s an intermittent issue and is out of reach for quasar https://github.com/webpack/webpack-dev-server/issues/2633.
dobbel last edited by dobbel
Here’s someone that claims to have found a way around this bug: use adb over wireless networks instead of using usb cable:
@dobbel Thanks for the help! Actually this solution does not fix the issue, but it can help sometimes to recover the connection, and I found that it is more stable while using adb over wireless networks.
I think I’ve found something!
The issue seems to come from my device itself. When adb does not found my device, or loose the connection to my device, I can’t even ping my device. In the same time, I can ping other devices without any problem.
This is apparently a Xiaomi issue, as said in this thread : https://c.mi.com/thread-3171679-1-1.html
So nothing related to neither adb nor Quasar nor Cordova, so everything is fine someway
Thanks again for your help
EDIT: if you are facing the same issue with a Xiaomi device, my workaround is to launch an app like Messenger. It does seem to wake the wifi up, and the connection comes back. There should be a proper way to wake the wifi up, but at least this workaround is working for now.
dobbel last edited by
Nice find! Xiaomi and some other brands are known to have a whitelist of (big name) apps that it will not kill after some idle time.( Like Whats App and FB messenger). Your Quasar app is not on that list . Very bad behavior that can drive someone mad to finding a solution.