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.

Error in remote readFile: Uncaught TypeError: Cannot read property 'update' of null

See original GitHub issue

My setup.

Two chrome based browsers (1. Ubuntu 18.04.5, 2. Win10)

A website that loads browserified hyper-sdk (from this repo)

A Node server running hyperswarm-web proxy and signal servers (used by hyper-sdk)

I can set up and read small text snippets:

e.g. Computer 1:

let hypersdk = await window.hyperSDK({swarmOpts:{preferredPort:42420,wsProxy:'wss:/my.url/proxy'}}
let c1Drive = await hypersdk.Hyperdrive('c1Drive')
await myDrive.writeFile('test','This is some text')
await myDrive.writeFile('blob',<1.3MB base64 encoded data (as string)>)

Computer 2:

let hypersdk = await window.hyperSDK({swarmOpts:{preferredPort:42420,wsProxy:'wss:/my.url/proxy'}}
let c1Drive = await hypersdk.Hyperdrive("hyper://"+<key of c1Drive>)
let txt = await c1Drive.readFile('test')  // works :-)
let vid = await c1Drive.readFile('blob')  // doesn't work, see error below:

I attempting to read the large file I get the following error, on the console of computer 1.

Uncaught TypeError: Cannot read property 'update' of null
    at XSalsa20.update (hyper-sdk-bundle.js:72718)
    at XORJS.update (hyper-sdk-bundle.js:72686)
    at XOR.encrypt (hyper-sdk-bundle.js:62572)
    at SimpleProtocol._sendNow (hyper-sdk-bundle.js:62330)
    at SimpleProtocol._send (hyper-sdk-bundle.js:62318)
    at SimpleProtocol.data (hyper-sdk-bundle.js:62256)
    at Channel.data (hyper-sdk-bundle.js:33587)
    at onvalue (hyper-sdk-bundle.js:36342)
    at Request._callback (hyper-sdk-bundle.js:37014)
    at Request.callback (hyper-sdk-bundle.js:55488)

I will continue to investigate, but posting here in case anyone can recognise what is going wrong.

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
RangerMauvecommented, Sep 6, 2021

Glad that’s sorted out! 😁 Thank you for the follow up.

0reactions
4c656554commented, Sep 2, 2021

I just re checked this, open the above debug check from links below, if you’d like to verify:

https://ooda.space/hypersdk_debug/hypersdk_debug_A.html

and

https://ooda.space/hypersdk_debug/hypersdk_debug_B.html

The error doesn’t appear, so I’d go ahead and close it - Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property of null - iDiallo
This error occurs when you read a property or call a method on a null object . That's because the DOM API returns...
Read more >
TypeError: Cannot read properties of undefined (reading 'id')
I got the error "Cannot read properties of undefined (reading 'spec')" when attempting to install a local npm module with npm install [path ......
Read more >
uncaught typeerror: cannot read properties of null ... - You.com
I am getting an error: Uncaught TypeError: Cannot read properties of null (reading 'querySelector'). At this step the tags input is showing NULL....
Read more >
Node.js v19.3.0 Documentation
The following, for instance, will throw the TypeError because there is no matching error type in the assertion: import assert from 'node:assert/strict'; ...
Read more >
TypeError: Cannot read property 'template' of null · Issue #2779
systemctl status uwazi.service. ○ uwazi.service - uwazi backend service for your-instance. Loaded: error (Reason: Invalid argument) Active: ...
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