question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DataTransferItem Uncaught DOMException

See original GitHub issue

Hello,

On Chrome (v.71.0) and not on Firefox, for some folders, I’ve this error: Uncaught DOMException

and the inspector show me the part of code which is concerned:

if (e.dataTransfer.items) {
  // Handle directories in Chrome using the proprietary FileSystem API
  var items = toArray(e.dataTransfer.items).filter(function(item) {
      return item.kind === 'file';
  });
  console.log(items);
  if (items.length === 0)
      return;
  parallel(items.map(function(item) {
      return function(cb) {
          processEntry(item.webkitGetAsEntry(), cb);
      }
      ;
  }), function(err, results) {
      // This catches permission errors with file:// in Chrome. This should never
      // throw in production code, so the user does not need to use try-catch.
      if (err)
          throw err;
      if (listeners.onDrop) {
          listeners.onDrop(flatten(results), pos);
      }
  });
}

and more specifically at the line throw err;

I’ve finally understood it was a name length problem : That concerns file with filename (path+name) with more than 260 characters (on Windows 7).

Do you understand why this Windows limit is also a limit in our case for Chrome drag&drop in Uppy dashbord (and not Firefox) ?

Thanks a lot, Aurélien

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
lakesarecommented, Jun 19, 2019

Yes. Line 42, and line 61. I’m not sure how we’d go about reporting these errors, maybe by just passing uppy.log function to webkitGetAsEntryApi? Would be nice if you looked into it.

0reactions
goto-bus-stopcommented, Jun 19, 2019

I didn’t see any console errors with this. I could try again with some extra logging. would the readEntries function in @uppy/utils/getDroppedFiles/utils/webkitGetAsEntryApi.js be the right place to add a console.error for that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

JS: Transfer DataTransferItemList to WebWorker
i want to use the synchroneous JS FileSystem API, therefore, this code has to be put to a webworker. the incoming data for...
Read more >
JS Error "Uncaught DOMException: Failed to execute 'send ...
Data Channel (Generate and transfer data sample): JS Error "Uncaught DOMException: Failed to execute 'send' on 'RTCDataChannel': RTCDataChannel.readyState is ...
Read more >
DataTransferItemList.add() - Web APIs | MDN
A DataTransferItem containing the specified data. If the drag item couldn't be created (for example, ... NotSupportedError DOMException.
Read more >
clearData method (dataTransfer) JavaScript
Removes the specified formatted data from the current drag-and-drop operation. Note: The dataTransfer object and its clearData method are supported in ...
Read more >
File API - W3C
... postMessage() , DataTransfer (part of the drag and drop API defined ... A FileReader has an associated error ( null or a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found