-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting to game via IPv6 not working #9
Comments
Edit and change it from this
to
The issue is Apple recently changed their captive portal system so that it will not automatically go to Safari anymore. I've been hoping there will be a workaround or they'll change back but until then this the only thing I can think of. Turning off captive portal support might be an option I could look into adding. Users would just connect to the wifi and you'd have to tell them yourself to go to some domain name. |
Thanks for the quick answer! I don't think that this is caused by the captive portal, since using the same address with my android phone results in the same behaviour. But using the captive portal to show further instructions is certainly a good workaround. |
the problem is the caltive portal is never exited. you click start and the
controller tries run inside the captive portal UI insteal of launching
Safari. That's why typing in a domain name or address works. Because you
manually launched Safari. That's the change Apple made. The IOS captive
portal UI no longer launches Safari when you click start
|
looks like it might be fixed in iOS 11 |
Oh, I'm sorry, I didn't see this was an issue on Android. What specific phone? I have no way to test Android at the moment and normal Android (Google Nexus, Pixel) didn't use to have a captive portal detector. Some other non Google Android phones do have captive portal detectors but I can't work around those without actually having access to the phone. |
My Android phone does not support captive portals either. I'm just typing in the IPv6 address, the captive portal on my ipad is redirecting me to. So here is a table how using the IPv6 address behaves on my android phone and my Ipad with different browsers: Bug = Controller page seems to load, but no player is created and it's reloaded about every two seconds automatically (which seems to be the same behaviour when the controller gets disconnected from the game)
|
thank you for all the data. do you have cookies off? in any case if you connect your phones to your computer via USB you should be able to open safari on the computer on mac and debug safari on iOS or chrome on desktop and debug chrome on Android. if you go to the javasscript console and set it so it does not clear the console on reload then you'll probably see and error messsge which will help find the bug https://blog.idrsolutions.com/2015/02/remote-debugging-ios-safari-on-os-x-windows-and-linux/ https://developers.google.com/web/tools/chrome-devtools/remote-debugging/ |
And I haven't changed any settings regarding cookie, so I guess they are enabled on each device. |
You're on window or mac? A few more things to try One you could try this DLL. Unzip and put the dll it in Another is, if you're on Windows you can turn on logging (if you're on mac there's more steps to debug the server) In Unity please pick "Window->HappyFunTimes->Settings" Then in the "Debug" area type Then run the game, all the output should be in the editor's log file. Drag and drop that log file into your reply below. One more thing, can you turn off ipv6 on your router? Of course I'd like to make it work but since you're using installation mode then it doesn't really need ipv6 does it? that might solve it |
Any luck? |
Sorry, I did not have the time to do it sooner. I've tried your dll, but without luck, it shows the exact same error when using chrome remote debug. Here's the editor log file with all the logging information (also using the new dll), the log from the game starts at line 1071: Editor.log.zip |
How about this. In change around line 275 from this (set ipv6Address to null)
to this
I'm not sure if that will fix it or not. You're running in installation mode so there's really no need for ipv6. So, this change should make the DNS part not return an address for IPV6 which makes me hope that both phones will just always go to ipv4 Let me confirm what you're trying to do.
ipv6 does not need to work for that so I'm hoping the change above would fix it for you |
Yes, this is exactly what I do, but the captive portal redirected the user
to said IPv6 address, but since you've said, that safari is never opened
when coming from the captive portal in newest ios versions, I will use the
captive portal only to give the user further instructions.
This would also prevent users from connecting via an IPv6 address (except
if they type it in, which is very unlikely) and is therefore a perfect
workaround for both issues.
|
If changing the code as above works for you I'll consider making installation mode ipv4 only by default so others don't run into this issue. (and also try it figure out why websockets isn't working on ipv6 in this case. I'm pretty sure it works over ipv6 otherwise). Looking at the log it looks like you're running on Linux? Just checking so I can verify if the issue is only there or if it also exists on Windows and Mac |
I'll try the code change with the original captive portal page to see where it's redirecting me to. Indeed, I'm using Ubuntu Mate 16.04. Maybe someone else should confirm this bug before making changes to the code, since it could be entirely my fault, but I don't know, that's why I've posted this issue. |
After applying the code change, I'm still redirected to the same IPv6 address. |
Sorry I need more info. By "redirected" you mean you connected to the wifi on your phone and then typed in some domain name? Can you try a different domain name? (maybe the old domain name is cached) Or did you mean on iOS the captive portal page popped up, you picked "start" and it redirected you? I can go comment out all the IPV6 code but if DNS isn't serving an IPV6 address then there's no IPV6 address to redirect to AFAIK when typing in a domain name. Even the captive portal would only go to an IPV4 address I'm pretty sure. You can try this too. Change
to this
Sorry this is so much work. I don't have a linux system I can test on and I think (though could be wrong) I can't get IPV6 running in a VM at the moment. |
I was talking about the captive portal page, this is the only issue, since it tries to connect via ipv6 when pressing the start button. DNS works fine on any phone and browser. |
I'm confused. Android doesn't use the captive portal redirector so you have to manually type a domain name which you said works for you iOS, with the change above, also requires you to manually type a domain name. So if on both system you have to manually type a name and manually typing a name is working what's left? I can try to fix the captive portal page without the change above but that won't help because current iOS 10 doesn't open the page in Safari when you click "Start". It just stays in the captive portal detector UI which can't run happyfuntimes. |
Right, with the change above, the captive portal has no start button thus the player won't connect to the game via IPv6. The player won't run into an issue. I'm sorry, that I did not say this clear enough before. But I did not close this issue since the change above is just to prevent the user from connecting to the game via IPv6 (and from opening the controller page in the captive portal browser in ios10), but the IPv6 issue still exists. |
But maybe the issue can be ignored, since it will be difficult to run into it when the change above is applied to the captive portal page. |
Well, if Apple fixes the captive portal stuff in iOS 11 then the problem will come back 😅 One question, does ipv6 work in normal non-installation mode? I know I've tested ipv6 on Windows and OSX in the past. I'll try to check it tonight to make sure it's still working and see if I can get Linux in a VM to use IPV6 too (not sure I can). |
So just fyi. I spent several hours trying to get ipv6 working on my router / pc, nothing to do with happyfuntimes, just trying to see some ipv6 addresses in I have a Airport Extreme which should just work. My isp is ipv6 based but I must be missing some setting somewhere. I also have some OpenWRT router which I thought I could at least get ipv6 working for the lan side but no luck there either. I'll keep hacking For the purpose of installation mode I'm leaning toward disabling ipv6 support if installation is on (and fixing the Start button redirect address). Anyway, just giving a progress report. |
I'm running my game in installation mode on a dedicated WLAN. When connecting to the game with an apple device via the captive portal, Safari shows the name input, but reloads the page every second, it also creates no player.
It behaves the same when trying to connect with the same IPv6 address, used by the captive portal, with my android smart phone on Chrome.
The used address seems to be an IPv4-mapped IPv6 address:
[0000:0000:0000:0000:0000:ffff:c0a8:0001]
.When connecting with the IPv4 address directly or using any domain name, I can play the game normally.
Is there also a possibility to run a game in installation mode without the captive portal?
The text was updated successfully, but these errors were encountered: