Coder Social home page Coder Social logo

Comments (7)

vicdus avatar vicdus commented on April 17, 2024 4

Hi,
We've already located the problem. Seems that is caused by gulp and we are working on fix it.

We will fix this ASAP in next release, but a quick workaround will be replace the ./dist/cjs.js line 1983 from
var _this8 = this; to var _this8 = _this7;

and the new method will be like

    value: function sendRequest(context) {
      function _recursive() {
        var _this8 = _this7;  // <- this line changed

from facebook-nodejs-business-sdk.

vicdus avatar vicdus commented on April 17, 2024

Hi,

I cannot reproduce this error. My step:

mkdir repoduce
cd reproduce
npm init
npm install --save facebook-nodejs-business-sdk

and my code

const adsSdk = require('facebook-nodejs-business-sdk');
const accessToken = 'mytoken';
const api = adsSdk.FacebookAdsApi.init(accessToken);

api.setDebug(true)
let AdVideo = adsSdk.AdVideo
let advideo = new AdVideo(null, {[AdVideo.Fields.filepath]: "sample.mp4"}, "act_<myadaccount>")
advideo.create().then(res=>{
	console.log(res)
})

Got 200 status code (although with unhandled promise reject warnings)

from facebook-nodejs-business-sdk.

FPG-Alan avatar FPG-Alan commented on April 17, 2024

@vicdus thanks for your response, actually, I got this log use either your code or mine:

200 POST https://graph-video.facebook.com/v3.0/act_adaccount/advideos?access_token=token {"file_size":799801,"upload_phase":"start"}
Response: "{\"video_id\":\"videoid\",\"start_offset\":\"0\",\"end_offset\":\"799801\",\"upload_session_id\":\"upload_session_id\"}"

(node:2516) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property '_startOffset' of undefined

I think the 200 status code indicate a "Chunked Upload" begin,
and the unhandled promise reject warnings shows an error which i posted before,
the promise reject interrupted the upload.

from facebook-nodejs-business-sdk.

FPG-Alan avatar FPG-Alan commented on April 17, 2024

@vicdus the workaround works for me, thanks for your work!

from facebook-nodejs-business-sdk.

michaelwclark avatar michaelwclark commented on April 17, 2024

@FPG-Alan can you close this if it's resolved?

from facebook-nodejs-business-sdk.

briank621 avatar briank621 commented on April 17, 2024

I don't believe that the fix has been pushed to master. Is there any update on this or perhaps more details on how to fix the gulpfile so a PR can be made?

from facebook-nodejs-business-sdk.

mvhirsch avatar mvhirsch commented on April 17, 2024

@vicdus I'm still running into this issue (SDK: v4.0.3).
Are there any news on fixing this?

from facebook-nodejs-business-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.