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

Error: Match error: Expected plain object #2

Closed
jamgold opened this issue Nov 29, 2014 · 7 comments
Closed

Error: Match error: Expected plain object #2

jamgold opened this issue Nov 29, 2014 · 7 comments
Labels

Comments

@jamgold
Copy link

jamgold commented Nov 29, 2014

When I get to this part in my example

uploader.send(document.getElementById('input').files[0], function (error, url) {
  Meteor.users.update(Meteor.userId(), {$push: {"profile.files": url}});
});

it always fails with error in view.js:406

Error: Match error: Expected plain object
@jamgold
Copy link
Author

jamgold commented Nov 29, 2014

This is a problem with the check function and Safari

@jamgold jamgold closed this as completed Nov 29, 2014
@jamgold
Copy link
Author

jamgold commented Nov 30, 2014

just filed issue with Meteor project meteor/meteor#3207

@gsuess
Copy link
Contributor

gsuess commented Nov 30, 2014

This needs a workaround. Thanks for reporting.

@gsuess gsuess reopened this Nov 30, 2014
@gsuess gsuess added the bug label Nov 30, 2014
gsuess added a commit that referenced this issue Nov 30, 2014
gsuess added a commit that referenced this issue Nov 30, 2014
@gsuess
Copy link
Contributor

gsuess commented Nov 30, 2014

Should be fixed now.

@gsuess gsuess closed this as completed Dec 1, 2014
@jamgold
Copy link
Author

jamgold commented Dec 1, 2014

Thank you

@jamgold
Copy link
Author

jamgold commented Dec 5, 2014

Since MDG just closed the issue with the check function I looked into this again and got it to work right with the following test on all browsers (Firefox, Safari, Chrome)

$('#file')[0].files[0].__proto__ == window.File.prototype

astraw added a commit to strawlab/meteor-slingshot that referenced this issue Feb 1, 2015
Previously, HTTPS certificate validation would fail if dots were in
the bucket name because the bucketURL would then contain multiple
levels of subdomains (e.g. some.depth.of.domains.s3.amazonaws.com).

Now, the bucket name is not included in the domain name during
uploads, and the HTTPS certificate is valid even when dots are in the
bucket name.

Note that this commit does not fix the situation for downloads. This
is more complicated because of multiple ways of downloading a
file. With S3 alone there is CulturalMe#1 (
https://bucket-name.s3[-and-possibly-region].amazonaws.com/key ) and
the approach used by this commit for uploading CulturalMe#2 (
https://s3[-and-possibly-region].amazonaws.com/bucket-name/key ). Then
there is with a CDN, which would typically be something like CulturalMe#3 (
https://cdn-distribution-name.cloudfront.net/key ). A suitable
solution to create download URLs that allows dots in the bucket name
is not covered by this commit. To word around this present limitation,
construct your own download URL using options CulturalMe#1, CulturalMe#2 and CulturalMe#3 according
to your needs.
@jessedvrs
Copy link

Try this in Safari: check($0, Element);
$0 equals the element you select in the elements panel
The error shows up again Match error: Expected plain object
But when I try $0 instanceof Element the console will output true.

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

No branches or pull requests

3 participants