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

Uppy 4.0.5 error #5358

Closed
2 tasks done
dev-android1 opened this issue Jul 19, 2024 · 5 comments · Fixed by #5361
Closed
2 tasks done

Uppy 4.0.5 error #5358

dev-android1 opened this issue Jul 19, 2024 · 5 comments · Fixed by #5361
Assignees
Labels

Comments

@dev-android1
Copy link

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

Upgrade to latest uppy dependencies

Expected behavior

It should work fine

Actual behavior

We tried to run with the updated version**(4.0.5)** but found the following errors -

Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'get')
TypeError: Cannot read properties of undefined (reading 'get')
    at AwsS3Multipart.getUploadParameters (index.js:412:63)
    at RateLimitedQueue.js:148:44
    at RateLimitedQueue._call2 (RateLimitedQueue.js:231:20)
    at RateLimitedQueue.run (RateLimitedQueue.js:113:61)
    at RateLimitedQueue.js:144:32
    at new ZoneAwarePromise (zone.js:1432:21)
    at HTTPCommunicationQueue.<anonymous> (RateLimitedQueue.js:143:28)
    at HTTPCommunicationQueue.<anonymous> (HTTPCommunicationQueue.js:384:90)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (asyncToGenerator.js:3:1)
    at resolvePromise (zone.js:1214:31)
    at zone.js:1121:17
    at zone.js:1137:33
    at asyncGeneratorStep (asyncToGenerator.js:6:1)
    at _throw (asyncToGenerator.js:25:1)
    at _ZoneDelegate.invoke (zone.js:375:26)
    at Object.onInvoke (core.mjs:14882:33)
    at _ZoneDelegate.invoke (zone.js:374:52)
    at Zone.run (zone.js:134:43)
    at zone.js:1278:36

Our code has these dependencies -

"@uppy/angular": "^0.7.0",
   "@uppy/core": "^4.0.1",
   "@uppy/dashboard": "^4.0.1",
   "@uppy/drag-drop": "^4.0.1",
   "@uppy/dropbox": "^4.0.0",
   "@uppy/onedrive": "^4.0.0",
   "@uppy/progress-bar": "^4.0.0",
   "@uppy/status-bar": "^4.0.0",
   "@uppy/url": "^4.0.0",
   "uppy": "^4.0.5",

we tried to run this code with Angular 17 but on runtime, we got the error.

One more question - Our system has Angular 15, can we use updated uppy dependencies in this without upgrading Angular to the latest?

image

@aduh95
Copy link
Contributor

aduh95 commented Jul 19, 2024

Can you clarify if there are some steps that leads to that error? Bonus points if you're able to provide a full repro e.g. using https://stackblitz.com/edit/vitejs-vite-zaqyaf?file=main.js

@dev-android1
Copy link
Author

dev-android1 commented Jul 19, 2024

Thanks for the reference.
we are getting an error when we click on uppy upload button. please refer screenshot -

image (1)

The code snippet which we tried is below. It was working before june 2024, but due to new uppy packages, this functionality stopped working.

import { Uppy } from '@uppy/core';
import AwsS3Multipart from '@uppy/aws-s3-multipart';
import { Dashboard } from 'uppy';
import { GoogleDrive } from 'uppy';
import OneDrive from '@uppy/onedrive';
import { Dropbox } from 'uppy';
import Url from '@uppy/url';
 
customFunction() {
    this.uppy = new Uppy({
      debug: true,
      autoProceed: false,
      onBeforeFileAdded: (currentFile, files) => {
		//custom validation code here
      }
    })
      .use(Dashboard, {
        trigger: ".UppyModalOpenerBtn",
        inline: true,
        target: ".DashboardContainer",
        replaceTargetContent: true
      })
      .use(GoogleDrive, { target: Dashboard, companionUrl: customUrl })
      .use(Dropbox, { target: Dashboard, companionUrl: customUrl })
      .use(Url, { target: Dashboard, companionUrl: customUrl })
      .use(OneDrive, { target: Dashboard, companionUrl: customUrl })
      .use(AwsS3Multipart, {
        limit: 6,
        companionUrl: customUrl,
      });
 
    this.uppy.on("complete", result => {
      this.isFileUploading = true;
      console.log("successful files:", result.successful);
      console.log("failed files:", result.failed);
    });
  }

Our system has Angular 15, can we use updated uppy dependencies in this without upgrading Angular to the latest?

@dev-android1
Copy link
Author

Any update on this?

@AbhishekSankhyan
Copy link

I am also facing the similar issue. Is there any update on this?

@Murderlon Murderlon self-assigned this Jul 23, 2024
@Murderlon
Copy link
Member

As mentioned in the migration guide, you are using companionUrl but you should be setting endpoint for @uppy/aws-s3.

https://uppy.io/docs/guides/migration-guides/#uppyaws-s3-and-uppyaws-s3-multipart

@Murderlon Murderlon closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants