Skip to content

Fix issue #3: contributions page - cancel call to ohsome when a component is unloaded#4

Open
justb4 wants to merge 1 commit intoosm-es-4.7.0from
osm-es-4.7.0-issue3
Open

Fix issue #3: contributions page - cancel call to ohsome when a component is unloaded#4
justb4 wants to merge 1 commit intoosm-es-4.7.0from
osm-es-4.7.0-issue3

Conversation

@justb4
Copy link
Collaborator

@justb4 justb4 commented Aug 10, 2025

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI
  • ❓ Other (please specify)

Related Issue

Example: Fixes #3

Describe this PR

The function fetchExternalJSONAPI() was called with an extra boolean parameter. This caused the exception.
This was a known issue in core TM version and was fixed in commit:
hotosm@56da86b
As we run from aa 4.7.0 already cherrypicked branch, a new cherrypick is required.

Screenshots

git cherry-pick 56da86bf3076e48fa0c0afc0a44b6ab08a079c83
Auto-merging frontend/src/api/stats.js
CONFLICT (content): Merge conflict in frontend/src/api/stats.js
Auto-merging frontend/src/network/genericJSONRequest.js
CONFLICT (content): Merge conflict in frontend/src/network/genericJSONRequest.js
Auto-merging frontend/src/views/userDetail.js
error: could not apply 56da86bf3... Cancel call to ohsome when a component is unloaded
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
just@savu:~/project/openstreetmap/hot/tm/fork.git$ git status
On branch osm-es-4.7.0-issue3
Your branch is up to date with 'origin/osm-es-4.7.0-issue3'.

You are currently cherry-picking commit 56da86bf3.
  (all conflicts fixed: run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   frontend/src/api/stats.js
	modified:   frontend/src/network/genericJSONRequest.js
	modified:   frontend/src/views/userDetail.js

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   frontend/src/api/stats.js
	modified:   frontend/src/network/genericJSONRequest.js
	modified:   frontend/src/views/userDetail.js

just@savu:~/project/openstreetmap/hot/tm/fork.git$ git add frontend/src/api/stats.js frontend/src/network/genericJSONRequest.js frontend/src/views/userDetail.js 
just@savu:~/project/openstreetmap/hot/tm/fork.git$ git cherry-pick --continue
[osm-es-4.7.0-issue3 1131a5bbd] Cancel call to ohsome when a component is unloaded
 Author: Taylor Smock <tsmock@meta.com>
 Date: Mon Mar 11 14:36:23 2024 -0600
 2 files changed, 38 insertions(+), 2 deletions(-)
just@savu:~/project/openstreetmap/hot/tm/fork.git$ git status
On branch osm-es-4.7.0-issue3
Your branch is ahead of 'origin/osm-es-4.7.0-issue3' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
just@savu:~/project/openstreetmap/hot/tm/fork.git$ 
just@savu:~/project/openstreetmap/hot/tm/fork.git$ git add frontend/src/api/stats.js frontend/src/network/genericJSONRequest.js frontend/src/views/userDetail.js 
just@savu:~/project/openstreetmap/hot/tm/fork.git$ git push

Alternative Approaches Considered

No.

Review Guide

Notes for the reviewer. How to test this change?

Checklist before requesting a review

[optional] What gif best describes this PR or how it makes you feel?

Good, hopefully now the contributions page https://tareas.openstreetmap.es/contributions will work again!

Signed-off-by: Taylor Smock <tsmock@meta.com>
@justb4 justb4 changed the title Cancel call to ohsome when a component is unloaded Fix contributions/ page: Cancel call to ohsome when a component is unloaded Aug 10, 2025
@justb4 justb4 changed the title Fix contributions/ page: Cancel call to ohsome when a component is unloaded Fix contributions/ page issue#3: Cancel call to ohsome when a component is unloaded Aug 10, 2025
@justb4 justb4 changed the title Fix contributions/ page issue#3: Cancel call to ohsome when a component is unloaded Fix issue #3: contributions page - cancel call to ohsome when a component is unloaded Aug 10, 2025
@justb4
Copy link
Collaborator Author

justb4 commented Aug 11, 2025

Complete workflow this PR (see also https://github.com/OSM-es/servidores/blob/master/tareas/pasos-reparar-login-4.7.0.md?plain=1#L106):

Apply Cherry-pick Nr 2 for /contributions page failure


This fails: https://tareas.openstreetmap.es/contributions

See issue 3: https://github.com/OSM-es/tasking-manager/issues/3
Create new branch `osm-es-4.7.0-issue3`. 
Cherry pick from https://github.com/hotosm/tasking-manager/commit/56da86bf3076e48fa0c0afc0a44b6ab08a079c83

# Selección de cerezas
git fetch
git checkout osm-es-4.7.0-issue3 
git cherry-pick 56da86bf3076e48fa0c0afc0a44b6ab08a079c83  
Auto-merging frontend/src/api/stats.js
CONFLICT (content): Merge conflict in frontend/src/api/stats.js
Auto-merging frontend/src/network/genericJSONRequest.js
CONFLICT (content): Merge conflict in frontend/src/network/genericJSONRequest.js
Auto-merging frontend/src/views/userDetail.js
error: could not apply 56da86bf3... Cancel call to ohsome when a component is unloaded
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

# resolve conflicts  
git add frontend/src/api/stats.js frontend/src/network/genericJSONRequest.js frontend/src/views/userDetail.js
git cherry-pick --continue
git push

# On server
cd /home/tm/tasking-manager  
git fetch  
git checkout osm-es-4.7.0-issue3  
git pull
make down  
docker-compose build --no-cache frontend  
make up  

# TODO LATER
# Testing, check https://tareas.openstreetmap.es/contributions ok now.
# August 10, 2025: Merge PR https://github.com/OSM-es/tasking-manager/pull/4
# Run server again from default branch osm-es-4.7.0: 

# On server
cd /home/tm/tasking-manager  
git fetch  
git checkout osm-es-4.7.0 
git pull
make down  
# Rebuild  
docker-compose build --no-cache
make up
# all ok, server running from osm-es-4.7.0 branch

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

Successfully merging this pull request may close these issues.

[BUG] Contributions page gives (auth) error

2 participants