question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: The expression cannot be converted to return the specified type.

See original GitHub issue

I have a file sending app that works fine on localhost with local testing but when hosted remotely even when the two browsers are on the same computer I get this error:

TypeError: The expression cannot be converted to return the specified type.

Which is thrown from here: https://github.com/feross/simple-peer/blob/master/index.js#L243

Not sure why it’s happening only on remote. If it helps the apps source is here: https://github.com/Arcath/file-from-me

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
nwoltmancommented, Jul 22, 2019

I found the reason for this. Firefox respects the max message size of the peer it is connected to, so if you try to send data larger than the max message size, Firefox throws this error. The default max message size is 65535 if the peer does not provide it (and currently no browser provides it other than Firefox).

So if you’re sending data larger than 65535 bytes, this is probably the source of the error.

0reactions
t-mullencommented, Dec 13, 2019

Tracking in #546

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xpath is invalid: TypeError: The expression cannot be ...
xpath is invalid : TypeError: The expression cannot be converted to return the specified type. The code I used is
Read more >
The expression cannot be converted to return the specified type.
TypeError : The expression cannot be converted to return the specified type.
Read more >
The expression cannot be converted to return the specified type
Missing ServiceWorker script gives confusing TypeError message - The expression cannot be converted to return the specified type.
Read more >
Common issues and solutions - mypy 0.991 documentation
ImportError from circular imports · NameError: name "X" is not defined from forward references · TypeError: 'type' object is not subscriptable from types...
Read more >
SQLSTATE values and common error codes - Db2 - IBM
01517, A character that could not be converted was replaced with a ... 10507, A type error was encountered processing an XPath or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found