Upload error in lib/modules/upload.js

Wappler Version : 5.7.0
Operating System : Ubuntu
Server Model: Node/Docker
Database Type:
Hosting Type: Digital Ocean

Expected behavior

What do you think should happen?

Uploads that were working previously should still work. Simple form that has a Dropzone, has always worked until recent update. Form submits images to S3 for repeat upload of form contents.

Actual behavior

Receive an error relating to uploads.js.

As this is a live site could not hang around restoring files from backup so will recreate the error locally and post the error details.

How to reproduce

  • Open page with form with upload (Dropzone).
  • Submit form.
  • Upload halts with error in lib/modules/upload.js

We replaced uploads.js with an older version and all is fine.

We have rolled back right to 5.3.2.1 and reverted to backups of our Projects as just too much breaking from routing (internal pages, fixed then broke again) to uploads (uploads.js), and dynamic selects lists. Became such a mess was spending too long chasing breaking changes. We can not afford the downtime.

Are you on the beta extensions channel?

What error do you see in the browser console?

It’s a bit unclear what exactly the issue is from your explanation simply saying “It should work, but it doesn’t”. We need more details …

Hi Teodor we rolled right back as just can’t have these issues happening. It was more important to have the application online and working rather than broken and dozens of support messages from users flooding our inbox, hence my quick bug report. It is the most recent changes to uploads.js that have broken the script. I’ll try and recreate it locally later on this evening for the exact error message for you to investigate.

I will update again later this evening and force the error and document it for you. You could also replicate it if you need to. Simple form with Dropzone pushing repeat of the upload to AWS S3 Bucket.

If you are in the beta channel then you can get breaking changes, we are currently busy with a major update for all components and in the current beta state they can cause several errors. If you are working on a project make sure you are using the stable channel for the extensions.

1 Like

Thank you @patrick

Same for me this morning since my last app push yesterday evening.
5.7 with stable channel.
What should I do? Thanks

It should be helpful if you could also post the error message since we still don’t know what error is being generated.

{“status”:“500”,“message”:“Cannot read properties of undefined (reading ‘create’)”,“stack”:“TypeError: Cannot read properties of undefined (reading ‘create’)\n at processFields (/opt/node_app/lib/modules/upload.js:81:77)\n at processFields (/opt/node_app/lib/modules/upload.js:61:27)\n at App.upload (/opt/node_app/lib/modules/upload.js:51:19)\n at App._exec (/opt/node_app/lib/core/app.js:608:57)\n at App._exec (/opt/node_app/lib/core/app.js:575:28)\n at async App.exec (/opt/node_app/lib/core/app.js:544:9)\n at async App.condition (/opt/node_app/lib/modules/core.js:109:17)\n at async App._exec (/opt/node_app/lib/core/app.js:608:30)\n at async App._exec (/opt/node_app/lib/core/app.js:575:17)\n at async App.exec (/opt/node_app/lib/core/app.js:544:9)”}

(Note: mobile App Bootstrap5 + Capacitor)

Unzip the following file to lib/modules: upload.zip (1.3 KB)

Let me know if it fixes your error.

Hi @patrick and thanks.
I can’t find the repository you’re talking about…

(Note: mobile App Bootstrap5 + Capacitor)

You should also have a project where you use server connect for the API, the error is on the node server.

1 Like

I was also having the same issue since 5.7 - upload.js from @patrick has fixed it for me :+1:

1 Like

omg… I do really need hollidays…
I spend the afternoon looking for the repo where I should paste this upload.js file in my mobile app while this morning I updated my server side project (and already fixed the bug)…
voila voila…
thanks folks

this was solved in the Wappler 5.8.0

1 Like