Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cann't parse server answer #185

Closed
hughknaus opened this issue Jan 25, 2023 · 4 comments
Closed

Cann't parse server answer #185

hughknaus opened this issue Jan 25, 2023 · 4 comments

Comments

@hughknaus
Copy link

When trying to connect (using NextGIS QGIS 22.10.0 based on QGIS 3.24) I get an error:

2023-01-25T16:01:16     INFO     Cann't parse server answer.  URL: https://hughknaus.nextgis.com/api/resource/0

2023-01-25T16:07:09     INFO    Request
             method: GET
             url: https://hughknaus.nextgis.com/api/component/pyramid/pkg_version
             json: None
             headers: None
             file: -
             byte data size: -
2023-01-25T16:07:09     INFO    --- canFetchMore start None
2023-01-25T16:07:09     INFO    --- canFetchMore finish None
2023-01-25T16:07:09     INFO    --- fetchMore startNone
2023-01-25T16:07:09     INFO    NGWRootResourcesLoader
2023-01-25T16:07:09     INFO    --- canFetchMore start None
2023-01-25T16:07:09     INFO    --- canFetchMore start None
2023-01-25T16:07:09     INFO    --- fetchMore finishNone
2023-01-25T16:07:09     INFO    --- canFetchMore start None
2023-01-25T16:07:09     INFO    Request
             method: GET
             url: https://hughknaus.nextgis.com/api/resource/0
             json: None
             headers: None
             file: -
             byte data size: -
2023-01-25T16:07:13     INFO    Response
             error response JSON parse
             
2023-01-25T16:07:13     INFO    Failed to get NGW version
2023-01-25T16:07:13     INFO    Response
             error response JSON parse
             
2023-01-25T16:07:14     INFO    Exception name: JobNGWError
2023-01-25T16:07:14     INFO    Jobs finished for current connection: 3
2023-01-25T16:07:14     INFO    processJobResult job: NGWRootResourcesLoader
2023-01-25T16:07:14     INFO    --- canFetchMore start None

The JSON from the URL https://hughknaus.nextgis.com/api/resource/0 looks fine:

{"resource":{"id":0,"cls":"resource_group","creation_date":"2023-01-25T20:50:12.336425","parent":null,"owner_user":{"id":4},"permissions":[{"action":"allow","principal":{"id":5},"identity":"","scope":"","permission":"","propagate":true},{"action":"allow","principal":{"id":7},"identity":"","scope":"data","permission":"write","propagate":true},{"action":"allow","principal":{"id":2},"identity":"","scope":"resource","permission":"read","propagate":true},{"action":"allow","principal":{"id":2},"identity":"","scope":"metadata","permission":"read","propagate":true},{"action":"allow","principal":{"id":2},"identity":"","scope":"datastruct","permission":"read","propagate":true},{"action":"allow","principal":{"id":2},"identity":"","scope":"data","permission":"read","propagate":true},{"action":"allow","principal":{"id":2},"identity":"","scope":"connection","permission":"connect","propagate":true},{"action":"allow","principal":{"id":2},"identity":"","scope":"webmap","permission":"display","propagate":true},{"action":"allow","principal":{"id":2},"identity":"","scope":"webmap","permission":"annotation_read","propagate":true}],"keyname":null,"display_name":"Main resource group","description":null,"children":true,"interfaces":[],"scopes":["resource","metadata"]},"resmeta":{"items":{}},"social":{"preview_image_exists":false,"preview_description":null}}
@simgislab
Copy link
Member

what's your Connect version?
update if updates are available

@hughknaus
Copy link
Author

hughknaus commented Jan 26, 2023

Started with the version it NextGIS QGIS came with, I think it was 0.13.9. But upgraded to the latest, 0.14.3 and the same errors.

@simgislab
Copy link
Member

This seems be a networking issue on your side.

Please read this: nextgis/quickmapservices#239 (comment)

This is not about Connect, but underlying causes might be the same.

You can try running:

import requests
r = requests.get('https://hughknaus.nextgis.com')
r.status_code

from your QGIS python console. This should return 200. If not, your PC or network is blocking your access.

@hughknaus
Copy link
Author

hughknaus commented Jan 26, 2023

I am getting a 200 response from the status_code.

I will make the assumption that this is due to corporate network settings and close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants