HOLY STUPID RABBIT HOLE! It works via the INSECURE websocket with the 192 address! The whole “Android 9 doesn’t allow insecure network” and “you have to install a network_security_config.xml” were total wild goose chases. Argh!
Thank you so much @outlog! Valuable lesson learned.
@outlog have you had trouble with errors in phoenix.js when running in RN? I discovered this morning that my app blows up when I run it without the debugger! The error is c.addEventListener is not a function. (In 'c.addEventListener("beforeunload", ...) and the only occurrence of “beforeunload” I can find is here:
Looking at the the minimized version of that code in my app’s node_modules, it looks like the logic matches:
This looks like it should correctly not try to invoke addEventListener if it’s not defined, but apparently it is. I can keep developing with the debugger, but it makes me nervous that I’m going down the wrong path, trying to use phoenix.js in a React Native app. Sounds like it works fine for you though?
Bah, I think I know what’s wrong. I am using the use-phoenix-channel library I mentioned earlier and it is pulling in an older version of phoenix.js that is not correctly guarding on that line. I have a fork of it so I’ll fix it there. Sorry for the noise.