ptkoz/captive-frontend

Hello! This works great! Except ... for some reason when i enter tokens i am getting an error message an it won´t connect

Opened this issue · 3 comments

Hello @pamelus ,

Again I want to congratulate you for such a fantastic work. I am truly amazed : O

Look, i managed to build the frontend and it looks beautyful!

Now, when I am generating tokens with /etc/init.d/captive token , it gives me a token : ) , but when I put it in the form, i am getting this error on the picture below: ( could you maybe suggest what i should check to make this work? my next move is to repeat the whole setup on a different router. maybe i missed some detail )

Screenshot_20220730-013239

If you prefer... we can arrange a call so i stop bothering through this "issues". My email: kikomayorga@gmail.com

Thanks and congrats again!

Hello Pamelus,

I ran the complete etup on another router and ended in the same point, as the previous picture. I was getting tokens by /etc/init.d/captive token , but then i get this error -just like the picture before- when entering the token.

Maybe it helps if i show you this first frame that comes out when trying to connect to the guest network. This is the first that comes:
image

Maybe you can suggest where to search further for errors?

Thanks!

ptkoz commented

@kikomayorga Would you mind posting what is visible in your browser's network inspector? This kind of error suggests some web requests have failed and you need to find out why.

Hello @Pamelus,
I´ll try to copy here the procedure and messages, to see if you can help me know where to look for! I certainly have to train still some node/js skills : S Thank you so much for your help!

Directly after i try my first page i get the 404 page i pasted a message before.

Then I open the browsers console and see this:

Output at “console”
i18next::backendConnector: loaded namespace common for language en-US Object
[warning]
index.js?v=2.0.0:1 i18next::backendConnector: loading namespace common for language en failed failed parsing /assets/i18n/common/en.json to json
output @ index.js?v=2.0.0:1
[warning]
index.js?v=2.0.0:1 i18next::backendConnector: loading namespace common for language es-419 failed failed parsing /assets/i18n/common/es-419.json to json
output @ index.js?v=2.0.0:1
index.js?v=2.0.0:1 i18next::backendConnector: loading namespace common for language es failed failed parsing /assets/i18n/common/es.json to json
output @ index.js?v=2.0.0:1
index.js?v=2.0.0:1 i18next: languageChanged es-419
index.js?v=2.0.0:1 i18next: initialized Object
[warning]
DevTools failed to load source map: Could not parse content for http://www.msftconnecttest.com/css/bootstrap.min.css.map: Unexpected token < in JSON at position 0

Output at „issues“

  1. Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform
  2. A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced.
    To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData.
    Note that for performance reasons, only the first access to one of the properties is shown.
  3. AFFECTED RESOURCES
  4. 1 source

jquery-ui-custom.min.js:1

Then i click the button “return to login page“, then i put a „token“ like 444444, (this time i just put any number, beacuse the same error was coming either with good or bad tokens)

And it comes out in the console this:
POST http://192.168.1.1:6820/captive.lua/auth.token net::ERR_CONNECTION_REFUSED
(anonymous) @ index.js?v=2.0.0:1
query @ index.js?v=2.0.0:1
post @ index.js?v=2.0.0:1
postJSON @ index.js?v=2.0.0:1
(anonymous) @ index.js?v=2.0.0:1
setTimeout (async)
Xo.dispatcher @ index.js?v=2.0.0:1
(anonymous) @ index.js?v=2.0.0:1
onSubmit @ index.js?v=2.0.0:1
(anonymous) @ index.js?v=2.0.0:1
E @ index.js?v=2.0.0:1
(anonymous) @ index.js?v=2.0.0:1
k @ index.js?v=2.0.0:1
T @ index.js?v=2.0.0:1
C @ index.js?v=2.0.0:1
P @ index.js?v=2.0.0:1
Sn @ index.js?v=2.0.0:1
ue @ index.js?v=2.0.0:1
Pn @ index.js?v=2.0.0:1
Nn @ index.js?v=2.0.0:1
_n @ index.js?v=2.0.0:1
l.unstable_runWithPriority @ index.js?v=2.0.0:1
Go @ index.js?v=2.0.0:1
ie @ index.js?v=2.0.0:1
(anonymous) @ index.js?v=2.0.0:1