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

ostrio_files.js error when using opera #293

Closed
sebastianlutter opened this issue Nov 18, 2016 · 9 comments
Closed

ostrio_files.js error when using opera #293

sebastianlutter opened this issue Nov 18, 2016 · 9 comments

Comments

@sebastianlutter
Copy link

When I try to test an application on Opera 12.16 Build 1860 (Debian 8, x86_64 system) I get an client error in ostrio_files.js line 1647:

Unhandled Error: Cannot convert '_URL' to object
											this._webWorkerUrl = _URL.createObjectURL(new Blob(['"use strict";self.onmessage=function(a){if(a.data.ib===!0)postMessage({bin:a.data.f.slice(a.data.cs*(a.data.cc-1),a.data.cs*a.data.cc),chunkId:a.data.cc});else{var b;self.FileReader?(b=new FileReader,b.onloadend=function(c){postMessage({bin:(b.result||c.srcElement||c.target).split(",")[1],chunkId:a.data.cc,s:a.data.s})},b.onerror=function(a){throw(a.target||a.srcElement).error},b.readAsDataURL(a.data.f.slice(a.data.cs*(a.data.cc-1),a.data.cs*a.data.cc))):self.FileReaderSync?(b=new FileReaderSync,postMessage({bin:b.readAsDataURL(a.data.f.slice(a.data.cs*(a.data.cc-1),a.data.cs*a.data.cc)).split(",")[1],chunkId:a.data.cc})):postMessage({bin:null,chunkId:a.data.cc,error:"File API is not supported in WebWorker!"})}};'], {
												type: 'application/javascript'//
											})); //
										})

The command in the next line (1646) sets _URL to undefined, which obviously causes the error on line 1647:

_URL = window.URL || window.webkitURL || window.mozURL; //

Versions:
Meteor 1.4.2.3
ostrio:files@1.7.5

This only happens in Opera, the application runs well on Firefox, Chrome.

@dr-dimitru
Copy link
Member

Hello @sebastianlutter

Thank you for report, sorry for delay.

  1. Is this Mac, Linux or Win?
  2. Which Opera version?

@dr-dimitru
Copy link
Member

Tested on Mac Opera (43.0.2431.0) and (41.0.2353.69), can't reproduce

dr-dimitru added a commit that referenced this issue Dec 12, 2016
@sebastianlutter
Copy link
Author

  1. Is this Mac, Linux or Win? Debian 8, x86_64 system
  2. Which Opera version?
user@work:~$ sudo apt-cache show opera
Package: opera
Version: 12.16.1860
Architecture: amd64
[ . . . ]
Homepage: http://www.opera.com/browser/
Priority: optional
Section: non-free/web
Filename: pool/non-free/o/opera/opera_12.16.1860_amd64.deb
[ ... ]

@dr-dimitru
Copy link
Member

This will be fixed in next release

@dr-dimitru dr-dimitru added the bug label Dec 14, 2016
@sebastianlutter
Copy link
Author

This is the result of _URL when I ran in operas console:

>>> _URL = window.URL || window.webkitURL || window.mozURL || window.msURL || window.oURL || false;
false

Then the condition the line after would be false

if window?.Worker and window?.Blob and _URL

I have no understanding of the surrounding code, is this what you expected?

@dr-dimitru
Copy link
Member

Yes,

Basically, BlobBuilder is not supported, so it will fall-back to request Worker code over the wire.

dr-dimitru added a commit that referenced this issue Dec 15, 2016
 - NPM dependencies update
 - Support for updated *Buffer* API on node >= 6.*
 - Methods `addFile`, `write` and `load` now supports `userId` option,
see #305
 - Fix for unfinished uploads, now files is removed by upload TTL. See
#267, thanks to @ck23onGithub
 - Better FS-stream management on server. Less memory and CPU
consumption. Only one descriptor per upload. Fix FS-permissions
 - `.unlink()` method now supports callback
 - Docs for [MUP/Docker
integration](https://github.com/VeliovGroup/Meteor-Files/wiki/MeteorUp-(
MUP)-Usage)
 - Fix #293
 - Fix #299
 - BEtter AWS dos, see #282
 - `storagePath` now always is function, if *String* is passed - it
will be wrapped into function
 - Please participate at [this
thread](#309) to give
a right path for Meteor-Files v2.0
@dr-dimitru dr-dimitru mentioned this issue Dec 15, 2016
dr-dimitru added a commit that referenced this issue Dec 15, 2016
v1.7.6
 - NPM dependencies update
 - Support for updated *Buffer* API on node >= 6.*
 - Methods `addFile`, `write` and `load` now supports `userId` option, see #305
 - Fix for unfinished uploads, now files is removed by upload TTL. See #267, thanks to @ck23onGithub
 - Better FS-stream management on server. Less memory and CPU consumption. Only one descriptor per upload. Fix FS-permissions
 - `.unlink()` method now supports callback
 - Docs for [MUP/Docker integration](https://github.com/VeliovGroup/Meteor-Files/wiki/MeteorUp-(MUP)-Usage)
 - Fix #293
 - Fix #299
 - BEtter AWS dos, see #282
 - `storagePath` now always is function, if *String* is passed - it will be wrapped into function
 - Please participate at [this thread](#309) to give a right path for Meteor-Files v2.0
@dr-dimitru
Copy link
Member

Hi @sebastianlutter

Published as v1.7.6
Could you please update, and confirm as fixed on your end?

@sebastianlutter
Copy link
Author

updated to v1.7.6, confirm it is working now (Opera 12.16.1860 on Debian 8)

Thanks :)

@dr-dimitru
Copy link
Member

@sebastianlutter great, thank you for report.

Please, support this project by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants