Cornelius
Cornelius

Reputation: 388

Uploadcare with VueJS. jQuery Exception onSuccess since this morning

I have been using Uploadcare via uploadcare-vue wrapper for a week perfectly. Since this morning I have a jQuery exception that stops the script. Of course I am not using jQuery that can interfere in any way with their script.

jQuery.Deferred exception: settings is undefined openDialog/currentDialogPr<@webpack-internal:///./node_modules/uploadcare-widget/uploadcare.js:13882:11
fire@webpack-internal:///./node_modules/jquery/dist/jquery.js:3291:31
fireWith@webpack-internal:///./node_modules/jquery/dist/jquery.js:3421:7
Deferred/</deferred[tuple[0]]@webpack-internal:///./node_modules/jquery/dist/jquery.js:3759:36
compose/<@webpack-internal:///./node_modules/uploadcare-widget/uploadcare.js:444:22
mightThrow@webpack-internal:///./node_modules/jquery/dist/jquery.js:3557:29
resolve/</process<@webpack-internal:///./node_modules/jquery/dist/jquery.js:3625:12
 undefined

I've created a fresh new repo of Nuxt to make sure it wasn't from my code:

<template>
  <div class="container">
    <Uploadcare :publicKey="uploadCarePublicKey" @success="onSuccess">
      <button>New Asset</button>
    </Uploadcare>
  </div>
</template>

<script>
import Uploadcare from 'uploadcare-vue'

export default {
  components: {
    Uploadcare
  },
  data() {
    return {
      uploadCarePublicKey: process.env.UPLOADCARE_PUBLIC_KEY
    }
  },
  methods: {
    onSuccess() {
      console.log('dede')
    }
  }
}
</script>

<style></style>
{
  "name": "toto",
  "version": "1.0.0",
  "description": "My awesome Nuxt.js project",
  "author": "K",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "@nuxtjs/axios": "^5.3.6",
    "@nuxtjs/dotenv": "^1.4.0",
    "@nuxtjs/pwa": "^3.0.0-0",
    "nuxt": "^2.0.0",
    "uploadcare-vue": "^1.0.0"
  },
  "devDependencies": {}
}

And I tried with many browsers, just in case.

Any tips?

Upvotes: 0

Views: 272

Answers (1)

Cornelius
Cornelius

Reputation: 388

Here is the answer from Uploadcare, if anyone have the same issue:

Most likely, the error is caused by this line of code in uploadcare-vue

https://github.com/tipeio/uploadcare-vue/blob/master/src/Uploadcare.vue#L141

The openDialog takes 3 arguments - files, tab, and options. The tab argument could be omitted in versions < 3.8.1, but in the latest version, omitting this argument leads to an error. We're going to release a fix in a few days. At the moment, you can try to roll back to v3.8.0.

Upvotes: 0

Related Questions