Closed saimonmoore closed 5 years ago
cc @RangerMauve
Looking into this today
Try using DatArchive.load()
or DatArchive.create()
to initialize your archive instead.
I’m currently using DatArchive.create if no dat exists locally and otherwise I use the constructor. I believe I tried DatArchive.load but if I recall it hadn’t been implemented maybe?
On Mon, 1 Jul 2019 at 17:17, RangerMauve notifications@github.com wrote:
Try using DatArchive.load() or DatArchive.create() to initialize your archive instead.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RangerMauve/dat-archive-web/issues/9?email_source=notifications&email_token=AAAAD3VHKJWP2LAUPAS6O5TP5IN2DA5CNFSM4H4LGR22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6OTPY#issuecomment-507308479, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD3T4YT5WN73IZM52PTDP5IN2DANCNFSM4H4LGR2Q .
Oh weird! .load
should have been present. :P That's a pretty big bug. I'll quickly update that.
The other thing I was wondering was why the api change wrt to beaker for these 2 functions ?
At some point I’d like to be able to try and get this running on beaker as well :)
But I got quite far already this weekend...really just need to setup a friends system (I’ll need the events for this), add search and filtering and then perhaps a proxy server from which I can proxy from mobile.
On Mon, 1 Jul 2019 at 18:25, Saimon Moore saimonmoore@gmail.com wrote:
I’m currently using DatArchive.create if no dat exists locally and otherwise I use the constructor. I believe I tried DatArchive.load but if I recall it hadn’t been implemented maybe?
On Mon, 1 Jul 2019 at 17:17, RangerMauve notifications@github.com wrote:
Try using DatArchive.load() or DatArchive.create() to initialize your archive instead.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RangerMauve/dat-archive-web/issues/9?email_source=notifications&email_token=AAAAD3VHKJWP2LAUPAS6O5TP5IN2DA5CNFSM4H4LGR22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6OTPY#issuecomment-507308479, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD3T4YT5WN73IZM52PTDP5IN2DANCNFSM4H4LGR2Q .
Awesome :)
On Mon, 1 Jul 2019 at 18:29, RangerMauve notifications@github.com wrote:
Oh weird! .load should have been present. :P That's a pretty big bug. I'll quickly update that.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RangerMauve/dat-archive-web/issues/9?email_source=notifications&email_token=AAAAD3WKU2QH5GE3KJXTICDP5IWFZA5CNFSM4H4LGR22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6VL2Y#issuecomment-507336171, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD3WDIQ5PJXC3GRXRT5TP5IWFZANCNFSM4H4LGR2Q .
DatArchive.load
not being there was an oversight, but the other two are on purpose since they've been deprecated in Beaker.
You're expected to be using archive.watch()
now, I think. https://beakerbrowser.com/docs/apis/dat#watch
ping @pfrazee
Aah I’ll check for #watch tonight
On Mon, 1 Jul 2019 at 18:31, RangerMauve notifications@github.com wrote:
DatArchive.load not being there was an oversight, but the other two are on purpose since they've been deprecated in Beaker.
You're expected to be using archive.watch() now, I think. https://beakerbrowser.com/docs/apis/dat#watch
ping @pfrazee https://github.com/pfrazee
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RangerMauve/dat-archive-web/issues/9?email_source=notifications&email_token=AAAAD3SKK6CPH6EOQI54EWTP5IWOLA5CNFSM4H4LGR22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6VSOI#issuecomment-507337017, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD3XFMWDDHOSF6BUSK4TP5IWOLANCNFSM4H4LGR2Q .
Thanks a lot :)
On Mon, 1 Jul 2019 at 18:34, Saimon Moore saimonmoore@gmail.com wrote:
Aah I’ll check for #watch tonight
On Mon, 1 Jul 2019 at 18:31, RangerMauve notifications@github.com wrote:
DatArchive.load not being there was an oversight, but the other two are on purpose since they've been deprecated in Beaker.
You're expected to be using archive.watch() now, I think. https://beakerbrowser.com/docs/apis/dat#watch
ping @pfrazee https://github.com/pfrazee
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RangerMauve/dat-archive-web/issues/9?email_source=notifications&email_token=AAAAD3SKK6CPH6EOQI54EWTP5IWOLA5CNFSM4H4LGR22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6VSOI#issuecomment-507337017, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD3XFMWDDHOSF6BUSK4TP5IWOLANCNFSM4H4LGR2Q .
Just pushed out 2.0.2 which has DatArchive.load()
:)
Geez that was quick :) Thanks a lot
Will try later on tonight
On Mon, 1 Jul 2019 at 18:35, RangerMauve notifications@github.com wrote:
Just pushed out 2.0.2 which has DatArchive.load() :)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RangerMauve/dat-archive-web/issues/9?email_source=notifications&email_token=AAAAD3RP2TCJ72UAG3NRYR3P5IW3NA5CNFSM4H4LGR22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY6V4BA#issuecomment-507338244, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD3Q4DVRCY7RKDKKTORTP5IW3NANCNFSM4H4LGR2Q .
@RangerMauve DatArchive.load
seemed to do the trick however I noticed that there isn't any archive.watch
currently implemented.
Shoot. I could have sworn I had done something already. 😅
I'm a little busy with the SDK at the moment, but it should be possible to port over the work paul did here into dat-archive-web if you're for taking a shot at it. 😁
Yep. Will try. Thanks for the hint.
On Tue, 2 Jul 2019 at 23:22, RangerMauve notifications@github.com wrote:
Shoot. I could have sworn I had done something already. 😅
I'm a little busy with the SDK at the moment, but it should be possible to port over the work paul did here https://github.com/beakerbrowser/dat-node/blob/master/lib/dat-archive.js#L203 into dat-archive-web if you're for taking a shot at it. 😁
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RangerMauve/dat-archive-web/issues/9?email_source=notifications&email_token=AAAAD3WUF7Z22H5MJH4HG5TP5PBHRA5CNFSM4H4LGR22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZCSVUI#issuecomment-507849425, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAD3XCEA25HV3QYNKUFNTP5PBHRANCNFSM4H4LGR2Q .
I've got something together but not sure it's working as I see no events 😅 so digging into it...
Awesome, thank you so much for the fix! :D
When I attempt to listen for network or file events via:
#createFileActivityStream
or#createNetworkActivityStream
I get the following error:from here:
From the code:
it looks like it decides wether to look up the the data from the disk, locally in the browser or remotely depending on wether the
key
is present in the archive but in this case it's not.The exception breaks the app but it appears the event listeners were added as I'm seeing some network events:
But as you can see from this trace, the
key
attribute is returned by thegetInfo
function but it doesn't appear to be in the dat archive object (or it's somehow added later...):You can reproduce this with this branch (see last commit):
https://gitlab.com/saimonmoore/dlynx/tree/createNetworkActivityStreamIssue