jparyani / laverna-sandstorm

1 stars 0 forks source link

Saved notes are not shown #1

Closed JamborJan closed 9 years ago

JamborJan commented 9 years ago

Hi @jparyani ,

The laverna port is a cool thing. I had an issue during the test. I changed the default note which is there after creating a new instance and saved it. After that I don't see the note any more in the preview on the right side and I cannot open it anymore. Same happens with any other new note.

bildschirmfoto 2015-03-09 um 08 38 33

Sandstorm Shell log is:

...** SANDSTORM SUPERVISOR: Starting up grain.
/ekam-provider/canonical/sandstorm/supervisor.c++:1121: warning: ip_tables kernel module not loaded; cannot set up transparent network forwarding.
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.
** SANDSTORM SUPERVISOR: Grain no longer in use; shutting down.
** SANDSTORM SUPERVISOR: Starting up grain.
/ekam-provider/canonical/sandstorm/supervisor.c++:1121: warning: ip_tables kernel module not loaded; cannot set up transparent network forwarding.
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.

I furthermore realized that it takes quite some time for the app to load. Only a question if interest: where is the data stored? And how? The settings from laverna where I can chose where data is stored are not shown in the sandstorm port.

JJ

jparyani commented 9 years ago

Hmm that's very strange. Can you make a backup of the grain and post a link to it here?

Laverna is a fully client side web app, and usually only stores its data to indexedDb/Localstorage. I tweaked it a bit to sync every change to a simple REST backend, and on app start it will load all that data from the backend. That may be where you're seeing your slow start, although I'm not certain. Another slow part can be that the app itself is about 250KB, and since we're serving it dynamically it can't be cached and has to be downloaded/parsed each time.

JamborJan commented 9 years ago

https://drive.google.com/file/d/0Bxqyo6yHmzb3bEs2YzZzaUMybVE/view?usp=sharing

jparyani commented 9 years ago

Thanks for the backup, it helped me track the issue down easily. It turned out a bug fix I made to importing prettify was wrong.

It's now fixed, and you can try it out with https://alpha.sandstorm.io/install/cac33b3e1e251550ebb0f8708f0316bd?url=http://sandstorm.io/apps/jparyani/laverna-5.spk (replace alpha.sandstorm.io with your host). It will be updated on the app list in a bit.

JamborJan commented 9 years ago

I can confirm everything works as expected now. Thanks @jparyani!