pretixscan-android icon indicating copy to clipboard operation
pretixscan-android copied to clipboard

Using combination rules for checking Covid certificates results in errors

Open hansegucker opened this issue 3 years ago • 8 comments

I activated the feature for checking Covid certificates with combination rules (2G+). After scanning the ticket, the Covid control screen pops up and asks for the documents. There, I selected "tested (Antigen)" (and used "Swipe to check in") and then "vaccinated". After using "swipe to check in" the second time, the app immediately crashes. In the Pretix backend, the scan also hasn't been registered:

image

It would be very great if you can give me some information what I can do further to fix this issue or at least helping with it.

hansegucker avatar Jan 14 '22 16:01 hansegucker

Which app version do you use exactly?

raphaelm avatar Jan 14 '22 16:01 raphaelm

Also, by "crashes" you mean a full crash? Doy ou use an official pretixSCAN build, and can you tell me the exact time of the crash so I can look in our crash reporting logs?

raphaelm avatar Jan 14 '22 16:01 raphaelm

Which app version do you use exactly?

1.13.1, official build

hansegucker avatar Jan 14 '22 17:01 hansegucker

Also, by "crashes" you mean a full crash?

Yes, the app has been closed.

can you tell me the exact time of the crash so I can look in our crash reporting logs?

Unfortunately not the exact time, but I remember that I send the report at approx. 5:25-5:30 p.m. and the exception was raised in the ...ui.MainActivity file around line 462. Thanks for your help!

hansegucker avatar Jan 14 '22 17:01 hansegucker

Yup, Sentry has this:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.widget.Button.getText()' on a null object reference
    at eu.pretix.pretixscan.droid.ui.MainActivity.setupApi(MainActivity.kt:462)
    at eu.pretix.pretixscan.droid.ui.MainActivity.access$setupApi(MainActivity.kt:123)
    at eu.pretix.pretixscan.droid.ui.MainActivity$syncRunnable$1$1.invoke$lambda-5(MainActivity.kt:566)
    at eu.pretix.pretixscan.droid.ui.MainActivity$syncRunnable$1$1.$r8$lambda$y28Y0P8M9crqzQjO5lPjVCvLdKs
    at eu.pretix.pretixscan.droid.ui.MainActivity$syncRunnable$1$1$$ExternalSyntheticLambda6.run
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6518)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

That would be:

https://github.com/pretix/pretixscan-android/blob/f494ede91adb13535e93db0ac826295e8ce4eb61/pretixscan/app/src/main/java/eu/pretix/pretixscan/droid/ui/MainActivity.kt#L462

Seen from 6 devices, all in the past 8 days. I don't quite get it though.

We fixed some things in 1.13.2, can you check if those help?

raphaelm avatar Jan 14 '22 17:01 raphaelm

The problem is still there (logs < 1 min), but only if doing the steps in the exact order I mentioned above. If I select "vaccinated" as first and then "tested (Antigen)", everything works fine.

hansegucker avatar Jan 14 '22 21:01 hansegucker

Hmm, that is similar to a bug @pc-coholic found during initial review, but that was since fixed.

Are you using pretix Hosted or self-hosted?

If self-hosted, can you check that your server-side pretix-covid-certificates plugin is the latest development version and can show me a screenshot of the settings?

If Hosted, can you tell me the event name / reach out at [email protected]?

raphaelm avatar Jan 17 '22 08:01 raphaelm

If self-hosted, can you check that your server-side pretix-covid-certificates plugin is the latest development version and can show me a screenshot of the settings?

I am using a self-hosted with pretix-covid-certificates==1b752b8eb2e31e38d10c0ba7feba28f740b7b5e7.

pretix-covid-settings

hansegucker avatar Jan 17 '22 10:01 hansegucker