PW-Sat2 / HAMRadio

How-To and Wiki pages for PW-Sat2 Ground Segment equipment and software dedicated for radio amateurs.
https://pw-sat.pl/
Other
22 stars 0 forks source link

Cannot load credentials #6

Closed pswiatki closed 5 years ago

pswiatki commented 5 years ago

Installed pw-sat2-gs on Arch Linux using pikaur (helper for pacman allowing it to work with AUR). All went well, I could launch the app without any problems. However, when trying to load my (newly generated) credentials.json - I got this error

image

Further inspection of the console output (where I launched the app from) reveals this:

2018-11-25 13:57:22,083 DEBUG: [app.load_credentials_file] Selected file: /home/pswiatki/Downloads/credentials.json
2018-11-25 13:57:22,083 DEBUG: [app.load_credentials_file] File valid
2018-11-25 13:57:22,083 DEBUG: [app.load_credentials_file] Load file exception
2018-11-25 13:57:22,085 DEBUG: [app.gui_pyqt.StartQT4] Not updated credential file - wrong or empty path

Seems that everything that got installed in /opt/pw-sat2-gs has write permission only for root. I suspect that whatever is read from credentials.json is supposed to be stored somewhere /opt/pw-sat2-gs and that fails for non-root user. To prove the point - when chown is used on the app's installation in /opt/pw-sat2-gs credentials get loaded nicely.

Wouldn't it be good to store credentials on a per-user basis?

begreeen commented 5 years ago

You're right that that the app assumes write permissions for it's installation directory. It was created to be just 'portable' app, so I assumed that you unzip it in the directory with sufficient permissions (read/write) for normal user. The distribution for Arch (AUR package) was created by the community. Our fault is that we didn't tested it extensively to avoid such problems... The only thing that I can do for now is to mention this issue and fix/solution next to AUR package or remove the package from the wiki since it introduces some 'mess' for users.

pswiatki commented 5 years ago

Please, mention that the additional step (making installation writable for the intended user) is needed, but do not remove from the WIKI. Perhaps there are other users who use Arch Linux who would be interested in your project and would participate, especially during flight. Cannot wait until I can properly decode some real time frames!

begreeen commented 5 years ago

https://github.com/PW-Sat2/HAMRadio/wiki/Notes-for-specific-Linux-distros#important Added info to wiki

lb5je commented 5 years ago

Getting the same error on Windows today???

73 de LB5JE Hans Jørgen

lb5je commented 5 years ago

2018-12-26 11:56:41,473 DEBUG: [urllib3.connectionpool] Starting new HTTP connection (1): radio.pw-sat.pl 2018-12-26 11:56:41,614 DEBUG: [urllib3.connectionpool] http://radio.pw-sat.pl:80 "POST /api/authenticate HTTP/1.1" 308 188 2018-12-26 11:56:41,618 DEBUG: [urllib3.connectionpool] Starting new HTTPS connection (1): radio.pw-sat.pl 2018-12-26 11:56:42,821 DEBUG: [urllib3.connectionpool] https://radio.pw-sat.pl:443 "POST /api/authenticate HTTP/1.1" 401 0 2018-12-26 11:56:43,006 DEBUG: [app.update.Updater] Got version file 2018-12-26 11:56:43,009 DEBUG: [app.update.Updater] Finished Updater 2018-12-26 11:57:09,947 DEBUG: [app.load_credentials_file] Load file exception 2018-12-26 11:57:09,960 DEBUG: [app.gui_pyqt.StartQT4] Not updated credential file - wrong or empty path 2018-12-26 11:57:12,828 DEBUG: [urllib3.connectionpool] Starting new HTTP connection (1): radio.pw-sat.pl 2018-12-26 11:57:12,961 DEBUG: [urllib3.connectionpool] http://radio.pw-sat.pl:80 "POST /api/authenticate HTTP/1.1" 308 188 2018-12-26 11:57:12,964 DEBUG: [urllib3.connectionpool] Starting new HTTPS connection (1): radio.pw-sat.pl 2018-12-26 11:57:13,249 DEBUG: [urllib3.connectionpool] https://radio.pw-sat.pl:443 "POST /api/authenticate HTTP/1.1" 401 0 2018-12-26 11:57:15,313 DEBUG: [app.watchdog.Watchdog] Finished Watchdog 2018-12-26 11:57:15,344 DEBUG: [app.gui_connection_state.CheckAuthThread] Finished CheckAuthThread 2018-12-26 11:57:15,405 DEBUG: [app.save_frames_file.SaveFramesFileThread] Finished ReceiveDistribute 2018-12-26 11:57:15,410 DEBUG: [app.receive_distribute.ReceiveDistribute] Finished ReceiveDistribute 2018-12-26 11:57:15,532 DEBUG: [app.upload_cloud.UploadCloud] Finished UploadCloud