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

TypeError: self._form.on is not a function #67

Open
goodhyun opened this issue Aug 4, 2016 · 7 comments
Open

TypeError: self._form.on is not a function #67

goodhyun opened this issue Aug 4, 2016 · 7 comments

Comments

@goodhyun
Copy link

goodhyun commented Aug 4, 2016

I'm having this error while uploading multipart forms via 'me/photos' using webpack/chrome

TypeError: self._form.on is not a function at Request.form (eval at <anonymous> (http://localhost:3000/dist/bundle.js:6239:2),

Isn't this related to this problem?
request/request#1961

@dantman
Copy link

dantman commented Aug 4, 2016

Actually the problem in this case is that you're misusing the library. This is a server-side API library meant to run exclusively in Node.js.

If you want to interact with the Facebook API in the browser, you should use Facebook's own JavaScript SDK.

@dantman dantman closed this as completed Aug 4, 2016
@goodhyun
Copy link
Author

goodhyun commented Aug 4, 2016

Sorry I didn't make myself clear, I was using it on electron which is also relying on node.js
Other apis such as 'me/feed' was okay though.

@dantman
Copy link

dantman commented Aug 17, 2016

Then it could be due to that issue.

If they fix it, I'll update the version of request used.

@dantman dantman reopened this Aug 17, 2016
@goodhyun
Copy link
Author

Thanks, looks like it affects all the project that uses request, lets say since the recent version of Chrome. 52 maybe...

@yawar-ali
Copy link

@goodhyun @dantman any luck with this yet ?

@yawar-ali
Copy link

@goodhyun How you tackle this issue and uploaded image to fb ?

@dantman
Copy link

dantman commented Apr 1, 2018

For other reasons related to the reliability and attitude towards semver of the request maintainers and the huge amount of completely unused bloat in request this library is switching to using needle to handle HTTP requests.

We need more information now on whether this bug related to request exists anymore as that library has been replaced in the current master.

Though if there are other web-based desktop application environments where Facebook's client-side SDK is not available and Graph API access is done in a server-side style, but node's http are not available. I may consider a switch to isomorphic-fetch.

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

3 participants