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

Seeing network error while editing and saving scripture resources #642

Open
elsylambert opened this issue Apr 10, 2024 · 11 comments
Open

Seeing network error while editing and saving scripture resources #642

elsylambert opened this issue Apr 10, 2024 · 11 comments

Comments

@elsylambert
Copy link
Contributor

elsylambert commented Apr 10, 2024

Seeing network error while editing and saving scripture resources
Edited Jonah 1:8 and Jonah 1:17 and weren't able to save them.
This seems to happen when you make changes either by editing the text or editing the alignment.
All of the other verses from Jonah 1 we were able to save after editing them.
Using es-419_gl/es-419_glt (org/repo) resource, Spanish literal text.

image.png

image

@abelpz
Copy link
Member

abelpz commented Apr 10, 2024

The 500 error is coming from the call to dcs API:
https://git.door43.org/api/v1/repos/es-419_gl/es-419_glt/diffpatch

Right after clicking the save button.

With this payload:

{
    "author": {
        "email": "abelper54@gmail.com",
        "name": "abelper8"
    },
    "branch": "auto-abelper8-JON",
    "committer": {
        "email": "abelper54@gmail.com",
        "name": "abelper8"
    },
    "content": "Index: 32-JON.usfm\n===================================================================\n--- 32-JON.usfm\n+++ 32-JON.usfm\n@@ -233,19 +233,19 @@\n \\zaln-s |x-strong=\"l:H4310\" x-lemma=\"מִי\" x-morph=\"He,R:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"לְ⁠מִי\"\\*\\w quién|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"l\" x-lemma=\"\" x-morph=\"He,R:Sp1cp\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"לָ֑⁠נוּ\"\\*\\w nos|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w está|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w ocurriendo|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n-\\w esta|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n-\\w desgracia|x-occurrence=\"1\" x-occurrences=\"1\"\\w*. ¿\\zaln-s |x-strong=\"H4100\" x-lemma=\"מָה\" x-morph=\"He,Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מַה\"\\*\\w A|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n+\\zaln-s |x-strong=\"d:H2063\" x-lemma=\"זֹאת\" x-morph=\"He,Td:Pdxfs\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"הַ⁠זֹּ֖את\"\\*\\w esta|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n+\\zaln-s |x-strong=\"d:H7451c\" x-lemma=\"רַע\" x-morph=\"He,Td:Ncfsa\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"הָ⁠רָעָ֥ה\"\\*\\w desgracia|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*. ¿\\zaln-s |x-strong=\"H4100\" x-lemma=\"מָה\" x-morph=\"He,Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מַה\"\\*\\w A|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w qué|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H4399\" x-lemma=\"מְלָאכָה\" x-morph=\"He,Ncfsc:Sp2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מְּלַאכְתְּ⁠ךָ֙\"\\*\\w te|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n-\\w dedicas|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\w De|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\n-\\zaln-s |x-strong=\"c:m:H0370\" x-lemma=\"אַיִן\" x-morph=\"He,C:R:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וּ⁠מֵ⁠אַ֣יִן\"\\*\\w dónde|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n+\\w dedicas|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\zaln-s |x-strong=\"c:m:H0370\" x-lemma=\"אַיִן\" x-morph=\"He,C:R:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וּ⁠מֵ⁠אַ֣יִן\"\\*\\w De|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\n+\\w dónde|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H0935\" x-lemma=\"בּוֹא\" x-morph=\"He,Vqi2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"תָּב֔וֹא\"\\*\\w vienes|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\\zaln-e\\*? ¿\\zaln-s |x-strong=\"H4100\" x-lemma=\"מָה\" x-morph=\"He,Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מָ֣ה\"\\*\\w Cuál|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w es|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H0776\" x-lemma=\"אֶרֶץ\" x-morph=\"He,Ncbsc:Sp2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"אַרְצֶ֔⁠ךָ\"\\*\\w tu|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n-\\w país|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\w De|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\n-\\zaln-s |x-strong=\"c:H0335\" x-lemma=\"אַי\" x-morph=\"He,C:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וְ⁠אֵֽי\"\\*\\zaln-s |x-strong=\"m:H2088\" x-lemma=\"זֶה\" x-morph=\"He,R:Pdxms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מִ⁠זֶּ֥ה\"\\*\\w qué|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\\zaln-e\\*\\zaln-e\\*\n+\\w país|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\zaln-s |x-strong=\"c:H0335\" x-lemma=\"אַי\" x-morph=\"He,C:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וְ⁠אֵֽי\"\\*\\zaln-s |x-strong=\"m:H2088\" x-lemma=\"זֶה\" x-morph=\"He,R:Pdxms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מִ⁠זֶּ֥ה\"\\*\\w De|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\n+\\w qué|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\\zaln-e\\*\\zaln-e\\*\n \\zaln-s |x-strong=\"H5971a\" x-lemma=\"עַם\" x-morph=\"He,Ncmsa\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"עַ֖ם\"\\*\\w pueblo|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H0859a\" x-lemma=\"אַתָּה\" x-morph=\"He,Pp2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"אָֽתָּה\"\\*\\w vienes|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\\zaln-e\\*?\"\\v 9 \\zaln-s |x-strong=\"c:H0559\" x-lemma=\"אָמַר\" x-morph=\"He,C:Vqw3ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וַ⁠יֹּ֥אמֶר\"\\*\\w Entonces|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w les|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w dijo|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n",
    "from_path": ".",
    "dates": {
        "author": "2024-04-10T17:10:48.429Z",
        "committer": "2024-04-10T17:10:48.429Z"
    },
    "message": "Edit '32-JON.usfm' using 'gatewayEdit'",
    "sha": "c0cc2c3b80f46c0fea3d4aa81f650ece3e73ace7",
    "signoff": true
}

@PhotoNomad0
Copy link
Contributor

@abelpz Thanks for the payload example. It make me wonder if there is a rare incompatibility in either the diff library and DCS api.

@PhotoNomad0
Copy link
Contributor

@elsylambert I cannot open the image - when I try to open it it says 'Non-Image content-type returned' (same in zenhub as github)

@elsylambert Do you still see this error with these verses? I am having trouble reproducing it.

@abelpz
Copy link
Member

abelpz commented May 22, 2024

@PhotoNomad0 we have a list of verses that weren't saved maybe we can setup a meeting and try to reproduce it using those verses.

@PhotoNomad0
Copy link
Contributor

@PhotoNomad0 we have a list of verses that weren't saved maybe we can setup a meeting and try to reproduce it using those verses.

@abelpz That's a great suggestion.

@PhotoNomad0
Copy link
Contributor

PhotoNomad0 commented May 28, 2024

The 500 error is coming from the call to dcs API: https://git.door43.org/api/v1/repos/es-419_gl/es-419_glt/diffpatch

Right after clicking the save button.

With this payload:

{
    "author": {
        "email": "abelper54@gmail.com",
        "name": "abelper8"
    },
    "branch": "auto-abelper8-JON",
    "committer": {
        "email": "abelper54@gmail.com",
        "name": "abelper8"
    },
    "content": "Index: 32-JON.usfm\n===================================================================\n--- 32-JON.usfm\n+++ 32-JON.usfm\n@@ -233,19 +233,19 @@\n \\zaln-s |x-strong=\"l:H4310\" x-lemma=\"מִי\" x-morph=\"He,R:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"לְ⁠מִי\"\\*\\w quién|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"l\" x-lemma=\"\" x-morph=\"He,R:Sp1cp\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"לָ֑⁠נוּ\"\\*\\w nos|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w está|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w ocurriendo|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n-\\w esta|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n-\\w desgracia|x-occurrence=\"1\" x-occurrences=\"1\"\\w*. ¿\\zaln-s |x-strong=\"H4100\" x-lemma=\"מָה\" x-morph=\"He,Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מַה\"\\*\\w A|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n+\\zaln-s |x-strong=\"d:H2063\" x-lemma=\"זֹאת\" x-morph=\"He,Td:Pdxfs\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"הַ⁠זֹּ֖את\"\\*\\w esta|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n+\\zaln-s |x-strong=\"d:H7451c\" x-lemma=\"רַע\" x-morph=\"He,Td:Ncfsa\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"הָ⁠רָעָ֥ה\"\\*\\w desgracia|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*. ¿\\zaln-s |x-strong=\"H4100\" x-lemma=\"מָה\" x-morph=\"He,Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מַה\"\\*\\w A|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w qué|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H4399\" x-lemma=\"מְלָאכָה\" x-morph=\"He,Ncfsc:Sp2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מְּלַאכְתְּ⁠ךָ֙\"\\*\\w te|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n-\\w dedicas|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\w De|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\n-\\zaln-s |x-strong=\"c:m:H0370\" x-lemma=\"אַיִן\" x-morph=\"He,C:R:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וּ⁠מֵ⁠אַ֣יִן\"\\*\\w dónde|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n+\\w dedicas|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\zaln-s |x-strong=\"c:m:H0370\" x-lemma=\"אַיִן\" x-morph=\"He,C:R:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וּ⁠מֵ⁠אַ֣יִן\"\\*\\w De|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\n+\\w dónde|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H0935\" x-lemma=\"בּוֹא\" x-morph=\"He,Vqi2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"תָּב֔וֹא\"\\*\\w vienes|x-occurrence=\"1\" x-occurrences=\"2\"\\w*\\zaln-e\\*? ¿\\zaln-s |x-strong=\"H4100\" x-lemma=\"מָה\" x-morph=\"He,Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מָ֣ה\"\\*\\w Cuál|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w es|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H0776\" x-lemma=\"אֶרֶץ\" x-morph=\"He,Ncbsc:Sp2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"אַרְצֶ֔⁠ךָ\"\\*\\w tu|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n-\\w país|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\w De|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\n-\\zaln-s |x-strong=\"c:H0335\" x-lemma=\"אַי\" x-morph=\"He,C:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וְ⁠אֵֽי\"\\*\\zaln-s |x-strong=\"m:H2088\" x-lemma=\"זֶה\" x-morph=\"He,R:Pdxms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מִ⁠זֶּ֥ה\"\\*\\w qué|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\\zaln-e\\*\\zaln-e\\*\n+\\w país|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*? ¿\\zaln-s |x-strong=\"c:H0335\" x-lemma=\"אַי\" x-morph=\"He,C:Ti\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וְ⁠אֵֽי\"\\*\\zaln-s |x-strong=\"m:H2088\" x-lemma=\"זֶה\" x-morph=\"He,R:Pdxms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"מִ⁠זֶּ֥ה\"\\*\\w De|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\n+\\w qué|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\\zaln-e\\*\\zaln-e\\*\n \\zaln-s |x-strong=\"H5971a\" x-lemma=\"עַם\" x-morph=\"He,Ncmsa\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"עַ֖ם\"\\*\\w pueblo|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n \\zaln-s |x-strong=\"H0859a\" x-lemma=\"אַתָּה\" x-morph=\"He,Pp2ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"אָֽתָּה\"\\*\\w vienes|x-occurrence=\"2\" x-occurrences=\"2\"\\w*\\zaln-e\\*?\"\\v 9 \\zaln-s |x-strong=\"c:H0559\" x-lemma=\"אָמַר\" x-morph=\"He,C:Vqw3ms\" x-occurrence=\"1\" x-occurrences=\"1\" x-content=\"וַ⁠יֹּ֥אמֶר\"\\*\\w Entonces|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w les|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\n \\w dijo|x-occurrence=\"1\" x-occurrences=\"1\"\\w*\\zaln-e\\*\n",
    "from_path": ".",
    "dates": {
        "author": "2024-04-10T17:10:48.429Z",
        "committer": "2024-04-10T17:10:48.429Z"
    },
    "message": "Edit '32-JON.usfm' using 'gatewayEdit'",
    "sha": "c0cc2c3b80f46c0fea3d4aa81f650ece3e73ace7",
    "signoff": true
}

I tried finding your branch so I could create a branch from it that had the problem, but it no longer exists. @abelpz

@PhotoNomad0
Copy link
Contributor

PhotoNomad0 commented Jun 5, 2024

Notes
Can reproduce the problem in Jon 1:12 of es-419_gl/es-419_glt by:

  • Edit verse and change Levántenme to LevántenmeZZ. Then add esta before culpa.
  • Next align the verse placing LevántenmeZZ in the empty alignment and then drop esta onto the bottom left alignment

If I make even the smallest change, it will successfully save (e.g. Such as using LevántenmeZ or LevántenmeZZZ)

I succeeded in saving by making a small change to the patch that is sent on the second attempt. I increased the context from the default 4 lines up to 6 lines for the patch, it then saves successfully. There doesn't seem to be anything wrong with the patch we send, but this small tweak makes things work. This makes me think it is not a problem with the library generating the patches, but some unknown DCS problem.

@PhotoNomad0
Copy link
Contributor

@elsylambert @danielklapp There is a fix for this error to retry with a larger diff file when there is a save error. This is in develop build v2.4.0 build adfde3f

@PhotoNomad0
Copy link
Contributor

PhotoNomad0 commented Jun 6, 2024

@elsylambert @danielklapp Here is a recording as to how I was able to recreate the save error using the retry fix. The save error occurs at 8:14

https://drive.google.com/file/d/1I2idmaWgT3hsCwjQL-OJs02rSCPa72uu/view?usp=share_link

But with this build it retries with a larger patch applied, which succeeds. In older builds it would just retry with the same patch, and that would fail. But it might work at later time. Or with any small change it would succeed.

@danielklapp
Copy link

@PhotoNomad0 I'll need access to the link you provided so I can view your recording.

@danielklapp
Copy link

I tested with v2.4.0 build c56c9c7 QA. While no network error messages appeared, a 500 (Internal Server Error) occurred randomly, stating "Failed to upload to user branch." This is expected due to the random nature of the error. Despite this, the save operation completes successfully with an automatic retry. This demonstrates that our work-around ensures users' changes are saved even when this random DCS issue occurs, without bothering the user with a network error message.

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

4 participants