Unable to upload word file into the system

Dear Team,

we have deployed Editoria successfully in our server and tested some functionality.
While trying to upload a word file into the system it throws error in the console.
also could not able to view image in the document.
we could able to create new chapter and edit directly.
Please find below image for your reference.

Kindly guide me on this.

Regards,
Mohan Kumar. A

8 posts were merged into an existing topic: Installing and deploying Kotahi

Dear Team,

we have deployed Editoria successfully in our server and tested some functionality.
While trying to upload a word file into the system it throws error in the console.
also could not able to view image in the document.
we could able to create new chapter and edit directly.
Please find below image for your reference.

Kindly guide me on this.

Regards,
Mohan Kumar. A

Something to do with the pagedjs service @alexgeorg?

@mohan can you provide some detail as to what exactly you deployed, as things have changed quite a lot recently? eg. what repo did you clone, what instructions did you follow, etc

Hello there :slight_smile:
As @yannis said it will be really helpful to walk us through your deployment steps. Also, if you have any logs from the server showing errors it will be useful too.

@alexgeorg and @yannis,

Thanks for the quick reply, please find below steps I have followed in deployment.

Used below URL instructions:

cloned the source file.
checked node version (12.16.1) and yarn version (> 1.19.1)
checked docker version (> 18.x.x) and docker-compose (> 1.2.x.x)
installed all dependencies using yarn in the root folder.
created environment file in (editoria-vanilla/config) path.
below is the export variables used:

export PUBSWEET_SECRET=‘secret-key’
export POSTGRES_USER=‘editoria’
export POSTGRES_PASSWORD=‘password’
export POSTGRES_HOST=‘localhost’
export POSTGRES_DB=‘editoria’
export POSTGRES_PORT=‘5432’
export LANGUAGE_PORT=‘8090’
export LANGUAGE_ENDPOINT=‘http:// localhost’
export SERVER_PORT=‘8000’
export PASSWORD_RESET_URL=‘http:// localhost/password-reset’
export PASSWORD_RESET_SENDER=’[tech_notification@amnet-systems.com]
export S3_ENDPOINT=‘http:// localhost’
export S3_PORT=‘9000’
export S3_ACCESS_KEY_ID_ADMIN=‘admin’
export S3_SECRET_ACCESS_KEY_ADMIN=‘superAdmin’
export S3_ACCESS_KEY_ID_USER=‘editoria’
export S3_SECRET_ACCESS_KEY_USER=‘editoria’
export S3_BUCKET=‘uploads’
export NODE_ENV=‘development’

created .env file in the root folder as below:
POSTGRES_USER=editoria
POSTGRES_DB=editoria
POSTGRES_PASSWORD=password
POSTGRES_PORT=5432

Mail configuration made in config/local-development.js
mailer: {
transport: {
host: “smtp.gmail.com”,
port: 587,
auth: {
user: “user”,
password: “password”,
}
}
}

created database editoria
created user editoria
given role and permission.

new terminal:
database container up using below command:
source config/development.env
yarn start:postgres

new terminal:
as instructed created new database for app by below command:
source config/development.env
yarn start:file-server

Create the app’s objects’ bucket for being able to upload files and create templates (should run only once upon the initialization of the application):
source config/development.env
yarn create:file-bucket

new terminal:
server up using below command:
source config/development.env
yarn server

When the server boots successfully open a new terminal session, source again your environment file and run yarn start:services which will initialize and start all the additional required Editoria’s services.

Thats it app opened in localhost:9000

Then we tried to test and found above error.

Hopes this will be enough.

Hey @mohan thanks for the detailed reply! The deployment process seems correct, could you share any errors that might exist in your logs?

Hi @alexgeorg,
Since could not able to upload images, please find below error log.

Error while export, preview, download.

  1. warning:
    GraphQL error: AssertionError [ERR_ASSERTION]: this version of pg-boss does not appear to be installed in your database. I can createit for you via start().

  2. While uploading word file:
    nothing has happened and no errors in console.

  3. while upload using add chapter:
    shows uploading visually and console throws below error:
    Uncaught (in promise) Error: GraphQL error: Something went wrong! Please contact your administrator
    at new ApolloError (bundle.esm.js:63)
    at Object.next (bundle.esm.js:1004)
    at notifySubscription (Observable.js:135)
    at onNotify (Observable.js:179)
    at SubscriptionObserver.next (Observable.js:235)
    at bundle.esm.js:866
    at Set.forEach ()
    at Object.next (bundle.esm.js:866)
    at notifySubscription (Observable.js:135)
    at onNotify (Observable.js:179)
    ApolloError @ bundle.esm.js:63
    next @ bundle.esm.js:1004
    notifySubscription @ Observable.js:135
    onNotify @ Observable.js:179
    next @ Observable.js:235
    (anonymous) @ bundle.esm.js:866
    next @ bundle.esm.js:866
    notifySubscription @ Observable.js:135
    onNotify @ Observable.js:179
    next @ Observable.js:235
    notifySubscription @ Observable.js:135
    onNotify @ Observable.js:179
    next @ Observable.js:235
    (anonymous) @ index.js:120
    Promise.catch (async)
    MutationData._this.runMutation @ react-hooks.esm.js:418
    handleFileUpload @ UploadFileButton.js:59
    callCallback @ react-dom.development.js:188
    invokeGuardedCallbackDev @ react-dom.development.js:237
    invokeGuardedCallback @ react-dom.development.js:292
    invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:306
    executeDispatch @ react-dom.development.js:389
    executeDispatchesInOrder @ react-dom.development.js:414
    executeDispatchesAndRelease @ react-dom.development.js:3278
    executeDispatchesAndReleaseTopLevel @ react-dom.development.js:3287
    forEachAccumulated @ react-dom.development.js:3259
    runEventsInBatch @ react-dom.development.js:3304
    runExtractedPluginEventsInBatch @ react-dom.development.js:3514
    handleTopLevel @ react-dom.development.js:3558
    batchedEventUpdates$1 @ react-dom.development.js:21902
    batchedEventUpdates @ react-dom.development.js:1060
    dispatchEventForLegacyPluginEventSystem @ react-dom.development.js:3568
    attemptToDispatchEvent @ react-dom.development.js:4267
    dispatchEvent @ react-dom.development.js:4189
    unstable_runWithPriority @ scheduler.development.js:653
    runWithPriority$1 @ react-dom.development.js:11061
    discreteUpdates$1 @ react-dom.development.js:21918
    discreteUpdates @ react-dom.development.js:1071
    dispatchDiscreteEvent @ react-dom.development.js:4168

Please guide me.

Regards,
Mohan Kumar. A

hello @mohan, based on your logs I would like to suggest the following:

  1. stop the application’s server
  2. stop the services container
  3. start again the application’s server and when you are sure that the application is started (e.g. visit app’s url in your browser and check that is running) then start the services container.

Also, have you used and scripts provided in the scripts/seeds folder?
Does the file server works correctly ?(e.g. in the asset manager modal of a book have you uploaded any images? if yes can you see their preview thumbnail?)

hi @alexgeorg,

I have stoped the app server and service container.
again started the app server and checked in the browser, it working fine.
then I started service containers.

Also I have seeded some initial data, using npm run seed.
I hope file server is working fine, since I could able to upload image file and preview it in the document.

Also found some error in graphql socket connection, Please check below screen shot.

Regards,
Mohan Kumar. A

I wonder if you all could move this to the Installing Editoria category?

Hey there @mohan, the issue that you mention is not an error, it is a warning. The subscriptions are working fine if for example you are able to create books and see them in the dashboard without refreshing the page.
So if I understand it correctly the image upload works correctly. What about the .docx upload?