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: 'Page Records cannot be deserialized' #586

Open
alankleindev opened this issue Oct 30, 2023 · 3 comments
Open

Error: 'Page Records cannot be deserialized' #586

alankleindev opened this issue Oct 30, 2023 · 3 comments

Comments

@alankleindev
Copy link

I am able to run the below code outside of runjS using the the same version of Node but within runJS, I get the following error:

Error: 'Page Records cannot be deserialized'

const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = require('twilio')(accountSid, authToken);

client.taskrouter.v1.workspaces('WS....')
                    .workers
                    .list({limit: 20})
                    .then(workers => {
                      workers.forEach(w => console.log(w.sid))
}).catch(err => {
  console.log(err);
});

It uses the Twilio Helper Library, 4.19.0.

Any suggestions?

@lukehaas
Copy link
Owner

@alankleindev some of the advanced RunJS settings and also the build settings have an effect on the way it runs code. You could try toggling them and see if it makes a difference.

@alankleindev
Copy link
Author

I tried toggling some settings under build, but didn't have any luck, same error: "Error: 'Page Records cannot be deserialized'".

It is not a show stopper, I was just curious why I was seeing different behavior.

@lukehaas
Copy link
Owner

lukehaas commented Nov 1, 2023

The error is coming from the library, so it's hard for me to say what's causing it.
Maybe if you take a look at the source there will be some clues:
https://github.com/twilio/twilio-node/blob/de635412136f0ea776fc0223a6235f249e2a5a0b/src/base/Page.ts#L253

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

No branches or pull requests

2 participants