uniuuu/zotprime

ZoteroObjectUploadError: 'preprint' is not a valid itemType"

Closed this issue · 13 comments

Hi @uniuuu
While testing the new script for user/group management, I tried to use the sync into this group. However, whatever I try to sync I have this error 'preprint' is not a valid itemType". This ItemType is in fact not in the database but I don't know why ALL documents shows this.
Do you have nay ideas ? There are the full errors.

[JavaScript Error: "Error 400 for item U8R5IEV7 in TestGroup:

ZoteroObjectUploadError: 'preprint' is not a valid itemType"]

[JavaScript Error: "'preprint' is not a valid itemType" {file: "chrome://zotero/content/xpcom/sync/syncEngine.js" line: 1357}]

[JavaScript Error: "Error 409 for item BREK9FMT in TestGroup:

ZoteroObjectUploadError: Parent item U8R5IEV7 not found"]

[JavaScript Error: "Parent item U8R5IEV7 not found" {file: "chrome://zotero/content/xpcom/sync/syncEngine.js" line: 1357}]

[JavaScript Error: "Error 409 for item BDBAKFJK in TestGroup:

ZoteroObjectUploadError: Parent item U8R5IEV7 not found"]

[JavaScript Error: "Parent item U8R5IEV7 not found" {file: "chrome://zotero/content/xpcom/sync/syncEngine.js" line: 1357}]

[JavaScript Error: "Made no progress during upload -- stopping" {file: "chrome://zotero/content/xpcom/sync/syncEngine.js" line: 1416}]

[JavaScript Error: "Made no progress during upload -- stopping" {file: "chrome://zotero/content/xpcom/sync/syncEngine.js" line: 1416}]

[JavaScript Error: "HTTP GET http://localhost:8080/retractions/list failed with status code 404:

<h1>Not Found</h1>
<p>The page you requested could not be found.</p>
"]

[JavaScript Error: "HTTP GET http://localhost:8080/retractions/list failed with status code 404:

<h1>Not Found</h1>
<p>The page you requested could not be found.</p>
"]

[JavaScript Error: "HTTP GET http://localhost:8080/retractions/list failed with status code 404:

<h1>Not Found</h1>
<p>The page you requested could not be found.</p>
"]

version => 6.0.26.SOURCE.f68dc7c90, platform => Win32, oscpu => Windows NT 10.0; WOW64, locale => fr-FR, appName => Zotero, appVersion => 6.0.26.SOURCE.f68dc7c90, extensions => Zotero LibreOffice Integration (6.0.4.SA.6.0.26.SOURCE.f68dc7c90, extension), Zotero Word for Windows Integration (6.0.3.SA.6.0.26.SOURCE.f68dc7c90, extension)
uniuuu commented

Hi @aitianshi
Thank you for your testing and finding.
Could you please share step by step details how I can reproduce the error ?

Sorry I forgot it. There are the steps to reproduce:

  • Create a user
  • Create group
  • Download random paper from Arxiv: https://arxiv.org/abs/1902.00005
  • Upload the PDF to the group
  • Synchronize --> Never fully synchronize even if some items are added in the DB, throw the above error

EDIT: an object created from Zotero doesn't have any problem, only upload existing PDF has this issue so far. It seems most of PDF objects are inserted in the DB but cannot verify if everything's there. Sync is very long

This error also might cause the previous error. Is there a standalone way to test ws://localhost:9000/ ?

[JavaScript Error: "WebSocket connection closed: 1006 "]

[JavaScript Error: "HTTP GET http://localhost:8080/retractions/list failed with status code 404:

<h1>Not Found</h1>
<p>The page you requested could not be found.</p>
"]

[JavaScript Error: "HTTP GET http://localhost:8080/retractions/list failed with status code 404:

<h1>Not Found</h1>
<p>The page you requested could not be found.</p>
"]

[JavaScript Error: "HTTP GET http://localhost:8080/retractions/list failed with status code 404:

<h1>Not Found</h1>
<p>The page you requested could not be found.</p>
"]

[JavaScript Error: "The connection was refused when attempting to contact ws://localhost:9000/."]

[JavaScript Error: "WebSocket connection closed: 1006 "]

[JavaScript Error: "The connection was refused when attempting to contact ws://localhost:9000/."]

[JavaScript Error: "WebSocket connection closed: 1006 "]

[JavaScript Error: "S3 returned 0 (2/KTECA6ZU) -- retrying upload"]

[JavaScript Error: "The connection was refused when attempting to contact ws://localhost:9000/."]

[JavaScript Error: "WebSocket connection closed: 1006 "]

[JavaScript Error: "The connection was refused when attempting to contact ws://localhost:9000/."]

[JavaScript Error: "WebSocket connection closed: 1006 "]

[JavaScript Error: "S3 returned 0 (2/KTECA6ZU) -- retrying upload"]

[JavaScript Error: "S3 returned 0 (2/KTECA6ZU) -- retrying upload"]

[JavaScript Error: "The connection was refused when attempting to contact ws://localhost:9000/."]

[JavaScript Error: "WebSocket connection closed: 1006 "]

[JavaScript Error: "S3 returned 0 (2/KTECA6ZU) -- retrying upload"]

[JavaScript Error: "S3 returned 0 (2/KTECA6ZU) -- retrying upload"]

[JavaScript Error: "The connection was refused when attempting to contact ws://localhost:9000/."]

[JavaScript Error: "WebSocket connection closed: 1006 "]

[JavaScript Error: "Upload request 2/KTECA6ZU failed"]

[JavaScript Error: "Une erreur de synchronisation de fichier s'est produite. Veuillez redémarrer Zotero et/ou votre ordinateur et essayez de synchroniser à nouveau.
 
 Si l'erreur persiste, il peut y avoir un problème soit avec votre ordinateur soit avec le réseau : logiciels de sécurité – antivirus, pare-feu – VPN, etc. Essayez de désactiver les logiciels de sécurité que vous utilisez ou, si c'est un portable, essayez depuis un autre réseau." {file: "chrome://zotero/content/xpcom/storage/zfs.js" line: 702}]

[JavaScript Error: "Error uploading full text for item KTECA6ZU in TestDBEtienne:

ZoteroObjectUploadError: An error occurred"]

[JavaScript Error: "An error occurred" {file: "chrome://zotero/content/xpcom/sync/syncFullTextEngine.js" line: 180}]

version => 6.0.26.SOURCE.f68dc7c90, platform => Win32, oscpu => Windows NT 10.0; WOW64, locale => fr-FR, appName => Zotero, appVersion => 6.0.26.SOURCE.f68dc7c90, extensions => Zotero LibreOffice Integration (6.0.4.SA.6.0.26.SOURCE.f68dc7c90, extension), Zotero Word for Windows Integration (6.0.3.SA.6.0.26.SOURCE.f68dc7c90, extension)

I noticed that .env file contains:

# Ip/host of the Minio.
S3HOST=10.5.5.1:9000

but docker-compose.yml shows that

 zotprime-minio:
    [...]
    networks:
      zotprime:
        ipv4_address: 10.5.5.7

@uniuuu , I checked Zotero repo, it might be linked to this opened PR zotero/zotero # 2401 to support Arxiv papers.
My second issue above is linked to Minio. I can make few PRs for Minio and DB management. Gonna check also what is missing to support Arxiv.

uniuuu commented

@aitianshi The line in error HTTP GET http://localhost:8080/ indicates that it tries to access localhost.
But in previous your post I saw you are using VM (or client- server setup where client and server are on different servers).
So to clarify the localhost setup is meant for server and client are running on same single computer. This idea inherited from original ZotPrime repository.
The VM setup is meant for such where server and client are sitting on different computers.
May I check if your setup done as VM Install described in README.md ?
If not then could you please try to rebuild both server and client while using respective configurations for both with VM IP Address and not localhost and then test again.
If this is the case of the issue could you please let me know what improvement of README.md you see that will make more clear the steps ?

I test my setup on my public network and private computer before deploying. So everything is local.

As mentioned few minutes before your asnwer I managed to upload/sync supported PDF by changing Minio address.

Also, the preprint error is due to some librairies lack of support (PR which is still opened zotero/zotero#2401). So I don't know who is really using synchronisation with such objects. I'm gonna try the PR commits.

preprint is in itemTypes from file ./client/zotero-client/resource/schema/global/schema.json but is missing the DB.

EDIT: I saw the file where all entries of the DB are done and it is in fact missing preprint with its relationships. I am still not familiar with your repository (or Zotero in general).
If entries are added in system-107.sql with the schema relationships, will the backend code support it ?

uniuuu commented

Hi @aitianshi

I test my setup on my public network and private computer before deploying. So everything is local.

If I understood correctly by "local" you mean localhost. Please confirm your client and server are on the same single machine/server and no VM run there.

Hi @aitianshi

I test my setup on my public network and private computer before deploying. So everything is local.

If I understood correctly by "local" you mean localhost. Please confirm your client and server are on the same single machine/server and no VM run there.

Hi @uniuuu
Yes they are on the same machine

uniuuu commented

I'll check on this issue today.

uniuuu commented

Hi @aitianshi
There was a typo which has been fixed in the latest 2.6.2 which is not related though to the issue.
But for the main issue 'preprint' is not a valid itemType I confirm it was reproduced on my side too for this type of pdf file.
Have you encountered this error with other type of files?

uniuuu commented

@uniuuu , I checked Zotero repo, it might be linked to this opened PR zotero/zotero#2401 to support Arxiv papers. My second issue above is linked to Minio. I can make few PRs for Minio and DB management. Gonna check also what is missing to support Arxiv.

Hi @aitianshi
The issue quoted is not related as the preprint is missing in zotero client and dataserver.
I traced it and found in file chrome/content/zotero/xpcom/translate/modules/utilities/resource/zoteroTypeSchemaData.js

Screenshot from 2023-10-22 15-00-08
It shows proprint's id is 38 but in https://github.com/uniuuu/dataserver/blob/master/misc/coredata.sql it's not there and last id is 37 so seems it wasn't added yet.
Moreover in client's https://github.com/uniuuu/zotero/blob/main/resource/schema/system-107.sql there are only total 36 id.
I have tried a quick fix to add respective entries to both files.
Screenshot from 2023-10-22 17-51-50

Screenshot from 2023-10-22 17-52-15

But it didn't not fixed issue.
I have created a new issue in the zotero/zotero repository let's see is it will be fixed any time soon.

This issue #14 will has status blocked/wont fix.
As this is the upstream issue I'll convert this one to discussion to monitor upstream progress.