Oauth2 xml configuration not found on windows
What is the bug or the crash? What were your expectations and what actually happened?
Using the documenation at https://docs.qfield.org/how-to/authentication/ and following the indicated steps I export my oauth2 config from Qgis to the auth folder of Qfield.
The about section tells me that my auth folder is C:\Users\345567\Mes Documents (local)\QField Documents\QField\auth So I put the exported xml files in it but when launching my project in QField the layer doesn't load, and doesn't trigger the Oauth login page either which makes me think that Qfield doesn't find the auth xml files.
I've tested on Qgis on the same desktop with the same project and the auth configuration works well and my layer loads.
Maybe I've missed something about file naming ?
Thanks in advance for your answers, Regards, Clément.
Steps to reproduce the issue
Create a projet with an authentified Oauth layer as specified here and open it using the Windows Qfield build
Version
3.6.3
Operating system name
Windows
Operating system version
22H2
Reinstall QField
- [x] I have a fresh install of the latest QField version, but the problem persists.
- [x] Problem can be reliably reproduced, doesn't happen randomly.
- [ ] Problem happens with all files and projects, not only some files or projects.
Additional context
No response
@cazitouni , would it be possible to provide a sample test project + authentication here? You can send it over to [email protected] .
thanks for the feedback @nirvn, email sent !
@cazitouni , thanks. The problem has to do with your authentication configuration file not having an .xml extension. If you add the file extension, things should go as expected (it did over here :) ).
@cazitouni , if you think the documentation could be improved on that front, we would welcome improvements over at https://github.com/opengisch/QField-docs/
Hello @nirvn,
Thanks for the feedback but I've tested with both a .xml extension and not and the result still the same for me. At least on a windows machine.
@cazitouni , did you re-launch QField after adding the .xml extension? Merely reloading the project would not work here, QField only reads authentication .xml files on launch.
I do, and got a layer error,
Despite having file with differents name with or without extension in the indicated folder
I've tested on my linux machine again, it seems to work with adding the .xml extension (Which is strange because Qgis export it without the extension on Linux).
But still doesn't on Windows, Maybe it's a windows path thing, or because of the space in the path due to our organisation policy I don't know.
let me know if you need me to do further testing.
Thanks again, regards, Clément.
The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.