core icon indicating copy to clipboard operation
core copied to clipboard

18.7 captive portal and vouchers doesn't work

Open rantwolf opened this issue 8 years ago • 20 comments

Hi. After upgrading to 18.7 my exisiting vouchers are gone... OK. Now when I'm creating new vouchers I get the *.csv for download. But the list is still empty. After this checkup I deleted the voucher server and created a new one. But still doesn't work.

Is there a log file int the cli for the voucher server?

rantwolf avatar Aug 01 '18 22:08 rantwolf

Sounds like the database was damaged. I'm not sure what is where, maybe @AdSchellevis has a bit of time to explain.

fichtner avatar Aug 02 '18 06:08 fichtner

I have exactly the same problem. It started after upgrading from 18.1.11 to 18.1.13. I tried to track down the changes and apparently the problem is related to https://github.com/opnsense/core/commit/fbca4bf4cc36a9dff4d89d9564cb595de92d6be1 For 18.1.13 reverting the changes make the vouches visible again.

frank499 avatar Aug 02 '18 07:08 frank499

@frank499 thanks for pinning this down, officially handing this over now

fichtner avatar Aug 02 '18 07:08 fichtner

at my end the vouchers look normal image

@frank499 If this page is empty on your end, could you gather some network responses from the webbrowser? maybe one of the endpoints fails in some scenario.

AdSchellevis avatar Aug 02 '18 20:08 AdSchellevis

Soo. I played around with the voucher server. Yesterday I told you that I deleted my old and created a new voucher server and nothing works. Today I created a new server again but now with another name of the server. Now I'm a surprised... it works fine. bildschirmfoto 2018-08-03 um 00 13 44

rantwolf avatar Aug 02 '18 22:08 rantwolf

For me also doesn't work: Production - OPNsense v18.1.13 ( voucher not working, but it worked on earlier version) Test: Clean install 18.1.1->18.1.13->18.7 (voucher not working).

advcron avatar Aug 03 '18 06:08 advcron

@advcron same question, when inspecting the network traffic in your browser, are there failed requests, if so, what does the response look like.

AdSchellevis avatar Aug 03 '18 06:08 AdSchellevis

Sorry but how can I " inspecting the network traffic in your browser" ?

advcron avatar Aug 03 '18 07:08 advcron

@advcron no problem, in chrome, right click on the page and choose "inspect", then look at the "network traffic" when you load the page. like this:

image

If you filter on "api" in the top left, you should see all api requests, if one fails, usually it's coloured red.

A correct call with response looks like this

image

AdSchellevis avatar Aug 03 '18 07:08 AdSchellevis

When I enter to voucher menu: 0 When I click generate voucher: 1

https://192.168.0.2/api/captiveportal/voucher/generateVouchers/Capative%20Voucher/ -> Respone {"status":"error"} https://192.168.0.2/api/captiveportal/voucher/listVoucherGroups/Capative%20Voucher/ -> Respone {} https://192.168.0.2/api/captiveportal/voucher/listVouchers/Capative%20Voucher/undefined/ -> Respone {}

advcron avatar Aug 03 '18 07:08 advcron

@advcron ok, got it, can you try to add a voucher group without a space in it? I'm guessing that's the issue.

AdSchellevis avatar Aug 03 '18 07:08 AdSchellevis

There isn't any space in voucher gorup 3

advcron avatar Aug 03 '18 08:08 advcron

"Capative Voucher"? my mistake, it's the server :)

AdSchellevis avatar Aug 03 '18 08:08 AdSchellevis

I can reproduce this here, no further actions needed.

AdSchellevis avatar Aug 03 '18 08:08 AdSchellevis

This is it !!! It works on 18.1.13 and 18.7.

Thank you very much!

advcron avatar Aug 03 '18 08:08 advcron

@advcron I'm still going to fix the issue, it should work with the space in between

AdSchellevis avatar Aug 03 '18 08:08 AdSchellevis

Hi,

Could it be that there is an similar issue when you use ä,ö,ü in the groupnames?

Since i addet a groupname with some umlauts, i see also no vouchers for this group, and the login page does not apere on the devices...

Thx Paul

peysche avatar Aug 16 '18 08:08 peysche

After up to 18.7.1_3 also umlauts ar working in groupnames

peysche avatar Aug 16 '18 11:08 peysche

@peysche have you even tried the supplied patch?

AdSchellevis avatar Aug 16 '18 11:08 AdSchellevis

hi, yes latest release fixes the problem!

thx paul

peysche avatar Aug 18 '18 18:08 peysche