Importing a QR with ODK Collect - Does the size of the image matter?

I received two QRs for ODK Collect over email on my Android device and I am trying to use the import QR function. However, I get "QR does not contain valid settings". However, If I scan the same QR it works OK.

Attached are the two examples of the QRs in jpeg and png formats

QR
QR

The only thing that comes to my mind is the size of the image but other Android QR readers are able to load both images.

I also tried with an RBG, 400x400 72dpi image:

enviro_champs_tracker_c

But also fail to load it.

Any idea is appreciated.

I've found that if you take a screenshot of the QR code and crop it, it doesn't work with the "Import QR code" option. However, if you use the "Share" icon to send the QR code, you can use the resulting file with the import option. Do you know how the QR code files are being saved out from the source app installation?

Yes, the last QR (The one RGB 400x400 72dpi) thas the following information:

eJx9kU1uAjEMha+C0m3LAIUW2Fa9QZeVIpN4ZgKTnyYOaou4e50MCFbdRIn9/MV+PgnQ1jixnZyE6sF1KBPGI0aOUMz4OLmGWx+ttEiggYCzLQwJz5zv0GGE4T/E+JY5FpXoicK2aeabxXT+sp4uZ9PFarldbWazJrOyUV/ZRJ+aEP0eFTXojvyWzLYhSYqgDgxnbG0pB24IpfUaC9yCy9wMZwNG47VR8k6WmILqUITIHf3I1rSE6CR7kDld6iCTt0BcONZcZ+VUbzRKP+gRyYBkvEt3glKb0OnygW/bgtM4IBVLavRG6noZMfkhEzNuVhkLxUDzW6fx0XTGjfPgN2Hku4QQuFT5qI3r7pgOjqaDC07sMlFprqzo4mRdkQNb0e/V1ae36urk4+aqUSPgM+v1s+YT57sSV37wZafiYfeqNa7F+fwHkBvEyA==

The decoded JSON structure is:
{
"admin": {
"change_server": true,
"change_form_metadata": false
},
"general": {
"change_server": true,
"server_url": "http://192.168.40.254:5900/user/cquiros/project/enviro_champs_tracker",
"form_update_mode": "manual",
"periodic_form_updates_check": "every_fifteen_minutes",
"automatic_update": false,
"hide_old_form_versions": false,
"autosend": "off",
"delete_send": false,
"high_resolution": true,
"image_size": "original",
"external_app_recording": false,
"navigation": "buttons"
},
"project": {
"name": "Enviro-Champs Tracker",
"icon": "\ud83d\ude1b",
"color": "#b7dde8"
}
}

I am using the documentation of https://docs.getodk.org/collect-import-export/#list-of-keys-for-all-settings to generate the QR.

However, there is no problem scanning the QR. The problem is the import function.

If I scan the QR and then export it, the resulting QR loses some of the settings:
{
"general": {
"navigation": "buttons",
"server_url": "http://192.168.40.254:5900/user/cquiros/project/enviro_champs_tracker",
"hide_old_form_versions": false
},
"admin": {
"change_form_metadata": false
},
"project": {
"name": "Enviro-Champs Tracker",
"icon": "\ud83d\ude1b",
"color": "#b7dde8"
}
}

Maybe because those settings are default? But it seems to me that the import QR function uses a different code to validate the JSON than the scan QR

I've investigated this issue and you are right that some QR codes can't be imported (scanning seems to be ok). I've reported the issue in our repository: https://github.com/getodk/collect/issues/5748 and was even able to fix it https://github.com/getodk/collect/pull/5747 so I hope the fix will be available in one of the upcoming releases.

@qlands thanks for reporting the issue.

That's right, if a QR code is generated by ODK Collect it skips settings that have default values.

1 Like

Hi @Grzesiek2010

Thank you for investigating it and fixing it. Do you know more or less when is the next release date? Just for us to plan around it.

We are planning on having two releases (v2023.3 and v2023.4) this year but this fix will be rather put into that second one so December I would say but @LN can confirm.

2 Likes