The requested URL was not found on the server (local server)

Open
#106 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
flask, python
Domain
api, backend

Research direction

Start in mergin/server/src/storages/disk.py at move_to_tmp, then inspect mergin/server/src/controllers/project_controller.py around push_finish. Reproduce the local project push and follow the traceback through os.renames. Done means the push-finish request no longer raises the reported cross-device link error and returns the expected response.

Written by the indexing model from the issue text.

Description

bug

During pushing new changes on the project, there is an error, when using server on localhost. So it have probably something with virtual environment.

Error: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

https://user-images.githubusercontent.com/83582181/131321227-ccb3bac6-54d1-49cf-abdc-1966cbf9b9b4.mp4

On the server itself i get this error:

INFO:werkzeug:127.0.0.1 - - [30/Aug/2021 11:48:31] "POST /v1/project/push/User4/ABC HTTP/1.1" 200 -
ERROR:src:Exception on /v1/project/push/finish/24d4c7f1-f330-4a7d-857f-2cb7e2fdb144 [POST]
Traceback (most recent call last):
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/connexion/decorators/decorator.py", line 48, in wrapper
response = function(request)
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/connexion/decorators/uri_parsing.py", line 144, in wrapper
response = function(request)
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/connexion/decorators/validation.py", line 384, in wrapper
return function(request)
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/connexion/decorators/response.py", line 103, in wrapper
response = function(request)
File "/home/shockwave/.local/share/virtualenvs/server-dyUHr1GY/lib/python3.8/site-packages/connexion/decorators/parameter.py", line 121, in wrapper
return function(**kwargs)
File "/home/shockwave/Lutra/mergin_server/mergin/server/src/auth/init.py", line 46, in wrapped_func
return f(*args, **kwargs)
File "/home/shockwave/Lutra/mergin_server/mergin/server/src/controllers/project_controller.py", line 856, in push_finish
move_to_tmp(upload_dir, transaction_id)
File "/home/shockwave/Lutra/mergin_server/mergin/server/src/storages/disk.py", line 95, in move_to_tmp
os.renames(src, temp_path)
File "/usr/lib/python3.8/os.py", line 270, in renames
rename(old, new)
OSError: [Errno 18] Invalid cross-device link: '/home/shockwave/Lutra/mergin_server/mergin/projects/c0/c666c2cb2ddeb22e3d2d67a9a2856c11/tmp/24d4c7f1-f330-4a7d-857f-2cb7e2fdb144' -> '/tmp/24d4c7f1-f330-4a7d-857f-2cb7e2fdb144/c0/c666c2cb2ddeb22e3d2d67a9a2856c11/tmp/24d4c7f1-f330-4a7d-857f-2cb7e2fdb144'

Dominant language
Python
Stars
23
Forks
12
Avg merge
2d 13h
Merged PRs (30d)
7

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MerginMaps/python-api-client

All issues in MerginMaps/python-api-client

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.