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

Failed to sync project due to an unhandled exception. #642

Open
mlb75010 opened this issue Nov 13, 2024 · 4 comments
Open

Failed to sync project due to an unhandled exception. #642

mlb75010 opened this issue Nov 13, 2024 · 4 comments

Comments

@mlb75010
Copy link

mlb75010 commented Nov 13, 2024

Dear Mergin Map,

I am having the following synchronization issue using the plugin. First time it happened.

My project folder is not in a Onedrive folder.

See below:

Traceback (most recent call last):

File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\sync_dialog.py", line 275, in pull_timer_tick
is_running = pull_project_is_running(self.job)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 527, in pull_project_is_running
raise future.exception()

File "C:\OSGeo4W\apps\Python312\Lib\concurrent\futures\thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users/xxxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 95, in _do_download
item.download_blocking(mc, mp, project_path)

File "C:\Users/xxxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_pull.py", line 317, in download_blocking
resp = mc.get(
^^^^^^^

File "C:\Users/xxxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client.py", line 231, in get
return self._do_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users/xxxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client.py", line 195, in wrapper
return f(self, *args)
^^^^^^^^^^^^^^

File "C:\Users/xxxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client.py", line 208, in _do_request
server_response = json.load(e)
^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json_init_.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@mlb75010
Copy link
Author

It happens with another project now, same issue.

The issue is happening after the upload is completed per the client-log:
2024-11-27 13:47:57,628 Upload finished: C:\Users\xxxxxxx\MerginMaps\Brigthspeed - Survey - MDWYGAXA\photos\photos-241120173241-Danyar Salimov.jpg
2024-11-27 13:47:57,696 Finishing transaction b2ffb755-46f6-489f-a92c-50d1c521845d

Please advise,

Thanks,

-Nicolas

Traceback (most recent call last):

File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\sync_dialog.py", line 220, in push_timer_tick
push_project_finalize(self.job)

File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client_push.py", line 268, in push_project_finalize
resp = job.mc.post("/v1/project/push/finish/%s" % job.transaction_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client.py", line 238, in post
return self._do_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client.py", line 195, in wrapper
return f(self, *args)
^^^^^^^^^^^^^^

File "C:\Users/xxxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Mergin\mergin\client.py", line 208, in _do_request
server_response = json.load(e)
^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json_init_.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OSGeo4W\apps\Python312\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@ValentinBuira
Copy link
Contributor

ValentinBuira commented Nov 29, 2024

Hi @mlb75010 , this exception has been daunting me for quite some times now. But I feel like with your help, we could find the root issue here.

Do you think could you:

  • submit diagnostic log from the plugin - see https://help.cloudmergin.com/plugin-logs
  • and if possible:
    • share the Mergin project with me - my mergin username is "ValentinB_lutra" (reader permission would be enough) - https://help.cloudmergin.com/sharing-project
    • zip the folder with your data (content of D:\mergin_maps_projects/ASCA_Avodale-Aug24/ folder) and send it to me for further analysis: valentin dot buira at lutraconsulting dot co dot uk

@alexbruy
Copy link
Contributor

alexbruy commented Dec 16, 2024

I'm seeing this issue as well quite a lot, below are my findings:

  • this happens to me when project (with all layers) has a big size ( > 1 GiB)
  • no matter how the project is uploaded via plugin or using web interface
  • when trying to debug it using local server, in the proxy log there are warnings like this one
    [warn] 22#22: *1544 a client request body is buffered to a temporary file /tmp/client_temp/0000000566, client: XXX.XXX.XXX.XXX, server: _, request: "POST /v1/project/push/chunk/8ab6c84f-812b-45da-85ed-feedcd5bf7c3/s5lg2qxw6l8 HTTP/1.1", host: "myhost", referrer: "https://myserver/"
    and there is an error at the end
    [error] 23#23: *1143 upstream prematurely closed connection while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: _, request: "POST /v1/project/push/finish/d60273a3-ed0c-4271-822a-9fa1f63889ba HTTP/1.1", upstream: "http://172.18.0.4:5000/v1/project/push/finish/d60273a3-ed0c-4271-822a-9fa1f63889ba", host: "myhost"
  • when big raster added to the project both plugin and web interface take a lot of time examining changes before starting actual upload

If the total size of the project is not that big there is no error, I ended up uploading rasters (which make most of the project size) in multiple steps: adding only a few rasters, syncing, adding a few more rasters and syncing again...

Interestingly, at the same time there are no issues when downloading a huge project.

I can share a project with the raster privately if necessary.

@tomasMizera
Copy link
Contributor

I'm seeing this issue as well quite a lot, below are my findings:

* this happens to me when project (with all layers) has a big size ( > 1 GiB)

* no matter how the project is uploaded via plugin or using web interface

* when trying to debug it using local server, in the proxy log there are warnings like this one
  `[warn] 22#22: *1544 a client request body is buffered to a temporary file /tmp/client_temp/0000000566, client: XXX.XXX.XXX.XXX, server: _, request: "POST /v1/project/push/chunk/8ab6c84f-812b-45da-85ed-feedcd5bf7c3/s5lg2qxw6l8 HTTP/1.1", host: "myhost", referrer: "https://myserver/"`
  and there is an error at the end
  ` [error] 23#23: *1143 upstream prematurely closed connection while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: _, request: "POST /v1/project/push/finish/d60273a3-ed0c-4271-822a-9fa1f63889ba HTTP/1.1", upstream: "http://172.18.0.4:5000/v1/project/push/finish/d60273a3-ed0c-4271-822a-9fa1f63889ba", host: "myhost"`

* when big raster added to the project both plugin and web interface take a lot of time examining changes before starting actual upload

If the total size of the project is not that big there is no error, I ended up uploading rasters (which make most of the project size) in multiple steps: adding only a few rasters, syncing, adding a few more rasters and syncing again...

Interestingly, at the same time there are no issues when downloading a huge project.

I can share a project with the raster privately if necessary.

Hello sir! Very good to hear from you! 😊

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

No branches or pull requests

4 participants