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

laverna.cc is down #991

Open
quasiyoke opened this issue Mar 5, 2019 · 23 comments
Open

laverna.cc is down #991

quasiyoke opened this issue Mar 5, 2019 · 23 comments

Comments

@quasiyoke
Copy link

@wwebfor it seems like https://laverna.cc is down for a couple of weeks. Could you help us with that? Where can I donate for the sake of stability of the service?

@Maks-s
Copy link

Maks-s commented Mar 5, 2019

Hi 😸

Sorry, but Laverna is no longer being worked on, see #971 (comment). However, there's a fork at https://github.com/encryptic-team/encryptic

@daed
Copy link

daed commented Mar 6, 2019

This is a problem as, unfortunately, this project has been abandoned.

For anyone who's using the hosted instance at laverna.cc, I'm not sure what to recommend to get to your data. I haven't tested it (I never used laverna.cc except to look at for curiousity's sake) but you MIGHT be able to do the following:

  • Change your hosts file to include 127.0.0.1 laverna.cc.
  • Download the 0.7.51 release of laverna.
  • Backup laverna/resources/app/electron.js
  • Modify laverna/resources/app/electron.js:49 to page: 'http://localhost:80/',
  • Modify laverna/resources/app/electron.js:154 to require('./server')(80);
  • Start laverna as root/admin*
  • While it's running, open your browser to laverna.cc and export data.
  • Close laverna and revert electron.js file.

* This really isn't a great idea for security reasons, but I don't have any others. If you're using linux you can redirect port 9000 to 80 instead using iptables and bypass editing the file or needing to run laverna as root. I don't think osx or windows has an iptables equivalent though. I'm not sure of any more secure way of handling this yet.

If this is something that is negatively affecting a lot of people, let me know and I'll try to figure some other way around it.

@Vicky19r
Copy link

Hi @daed,
I really have to recover some important notes. I followed your instructions. But I am facing some errors when I do 'gulp build'. Could you please give me some guidance here? If it is a very complex thing for you to look into this and guide me and will consume a lot of time, I can even pay for this guidance. Please let me know. This is really important to me. Thanks a lot for understanding.

Error log:


~/Projects/laverna$ gulp build
[10:04:47] Using gulpfile ~/Projects/laverna/gulpfile.js
[10:04:47] Starting 'build'...
[10:04:47] Starting 'clean:dist'...
[10:04:47] Finished 'clean:dist' after 3.45 ms
[10:04:47] Starting 'prism'...
[10:04:47] Starting 'less'...
[10:04:48] Finished 'less' after 1.03 s
[10:04:48] Finished 'prism' after 1.09 s
[10:04:48] Starting 'copy'...
[10:04:48] Starting 'require'...
[10:04:48] Starting 'htmlmin'...
[10:04:48] Starting 'cssmin'...
[10:04:49] Optimizing main.js
Error: ENOENT: no such file or directory, open '/home/vicky/Projects/laverna/app/bower_components/device.js/lib/device.min.js'
In module tree:
    main
      init
        app


events.js:183
      throw er; // Unhandled 'error' event
      ^
Error: Error: ENOENT: no such file or directory, open '/home/vicky/Projects/laverna/app/bower_components/device.js/lib/device.min.js'
In module tree:
    main
      init
        app

    at Object.fs.openSync (fs.js:646:18)

    at /home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:28332:19
    at /home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:3059:39
    at /home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:2999:25
    at Function.prim.nextTick (/home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:28083:9)
    at Object.errback (/home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:2998:26)
    at Object.callback (/home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:2984:23)
    at Object.then (/home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:3038:23)
    at build (/home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:28289:12)
    at runBuild (/home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:30302:17)
    at Object.execCb (/home/vicky/Projects/laverna/node_modules/requirejs/bin/r.js:1946:33)


@daed
Copy link

daed commented Mar 28, 2019

@Vicky19r are you building it from source? Did you try bower install yet? I looks like you might be missing some packages.

At any rate, you shouldn't need to build it from scratch even. I think you can just download the last release (https://github.com/Laverna/laverna/releases) and run that with the modifications I gave above.

@Vicky19r
Copy link

Hi @daed, yes I tried 'bower install' in both laverna and test directories. After that, I tried 'gulp build' and faced this error. Ok, I will try downloading the latest release and run as you suggested. Thanks a lot for guiding me.

@daed
Copy link

daed commented Mar 29, 2019

@Vicky19r were you able to have any luck with this?

@Vicky19r
Copy link

Hi @daed, I am going to try the latest release this evening and will let you know immediately. My Linux computer is at home. Thanks for asking and for the help. Have a nice weekend!

@Vicky19r
Copy link

Vicky19r commented Mar 29, 2019

Hi @daed, I just tried as you said. I am able to start the app. I have imported the old settings file and after that, it recognized my password and opened the app. I was using https://laverna.cc/app/ earlier when the site was up to save notes and I configured it to store all the data on my dropbox account. After the app started on my laptop it tried to access the Dropbox data but ended up throwing some 400 error. Looks like some OAuth issue.

dropbox url:
https://www.dropbox.com/oauth2/authorize?response_type=token&client_id=<***>&redirect_uri=http://laverna.cc/#notes

error message from Dropbox:

Error (400)
It seems the app you were using submitted a bad request. If you would like to report this error to the app's developer, include the information below.


More details for developers

Invalid redirect_uri. It must exactly match one of the redirect URIs you've pre-configured for your app (including the path).

Kindly let me know how to proceed from this point. Thanks a lot!...

@Vicky19r
Copy link

Vicky19r commented Mar 29, 2019

After the app started,
URL http://laverna.cc/#notes works and opens the app
but
URL http://laverna.cc/app doesn't work and throws some 'Cannot GET /app ' error.

Looks like I am using a different URL now with the app running on my laptop than the URL that I was using when the Laverna web application was up and running.

I just checked in my dropbox account, looks like the redirect URI configured is https://laverna.cc/ .

@daed
Copy link

daed commented Mar 29, 2019

I hadn't thought about that. I guess the actual files were hosted at /app on laverna.cc. I was kind of hoping they'd be the same.

Can you ignore/cancel the dropbox part and at least get to your notes?

@Vicky19r
Copy link

If I ignore the Dropbox part, I see no notes. :((

@daed
Copy link

daed commented Mar 29, 2019

Okay. This is going to get a little (even more) strange.

Go ahead and ignore it. Go to your settings -> transfer data and click export settings. Save the file somewhere. Then go back to the desktop app and try importing those settings from that file there. It might ask you to do the OAuth thing for dropbox over there, but I think that'll work because it's inside the app. As long as you have the correct settings I think it should sync back up with the notes.

@Vicky19r
Copy link

Vicky19r commented Mar 29, 2019

I think Dropbox is expecting https://laverna.cc/ (secured, https) as redirect URI to grant access and the app running on my machine is using the redirect URI http://laverna.cc/ (unsecured, http) in its HTTP request to Dropbox resulting in Dropbox complaining about redirect URIs not same.

@Vicky19r
Copy link

I will try as you suggested once.

@daed
Copy link

daed commented Mar 29, 2019

It is. The hangup is that there's no easy way to turn that http connection into an https one. You could set up a reverse proxy with apache to do it, but that's extremely invasive and I don't know how to do that off the top of my head.

If the settings export doesn't work, I can set up the laverna files on web hosting somewhere and then you can do the trick with the hosts file to change it to that hosting. I can host it via https so the redirect SHOULD hopefully work.

@Vicky19r
Copy link

The settings export did not work. That seems like a perfect solution. I couldn't thank you enough! I have some very important notes on it.

@daed
Copy link

daed commented Mar 29, 2019

@Vicky19r okay, I might have something now.

First, edit your laverna.cc entry in your hosts file to the following:

34.220.111.200  laverna.cc

That's a micro AWS instance I just spun up. It'll probably be a little slow.

Next, open your browser to whatever your regular laverna url is. I assume it's just https://laverna.cc/app.
It'll probably whine about certificate errors because I just self-signed one. It might complain about the common name not matching as well. You should be able to go to advanced (or whatever it's called in your browser) and confirm the exception to bypass that. If you're paranoid, the fingerprint should be:

D7:83:48:68:DE:80:B6:98:24:E5:32:3F:38:8C:16:18:C7:90:DC:96:61:EE:54:C6:87:53:DE:87:75:F6:32:A0

At that point see if it works. If it gives you the first time page, go ahead and import your settings again. If not, see if it'll let you get to the notes. I'm hoping it'll pick up the laverna files that are in your browser cache and just work.

Oh, the redirect URL might send you to ec2-34-220-111-200.us-west-2.compute.amazonaws.com, but if it does, then you should just be able to go back to laverna.cc and it work.

If this doesn't work out, then I guess next step would be to try to find a way to recover your notes from the files in your dropbox apps directory. I think someone else made a python script that got posted here somewhere to do something like that, but I've never tried using it.

I really hope this works for you.

@daed
Copy link

daed commented Mar 29, 2019

If this doesn't work, then open your developer pane on your browser and grab any messages that might be in there. Laverna would log sensitive stuff to console sometimes, so look at it and if you see things in there you don't want publicly posted, you can email it to me at [email protected] instead.

@Vicky19r
Copy link

I will try this tonight and will let you know @daed. Thanks a lot. Is there any way to bring the original web app online for like 10 minutes? I can pay for it.

@daed
Copy link

daed commented Mar 30, 2019

Honestly, if I had access to any of the laverna stuff, I'd have brought it up for people already. It sucks that it just went down with zero warning or recourse.

@Vicky19r
Copy link

@daed, Thanks a lot. I did like you said. It was not able to connect to Dropbox but it did show all my notes from browsers DB may be. Fortunately, I backed up the data and also manually copy pasted all my notes into a local drive. Thank God. You have saved my day!!. I will buy you lunch for helping me! An email will come to your inbox soon.

@Vicky19r
Copy link

Vicky19r commented Mar 30, 2019

Looks like the browser cache will only open up if it is HTTPS like https://laverna.cc/app not HTTP. I did not even try to use Dropbox this time.

@daed
Copy link

daed commented Mar 31, 2019

Awesome. I'm glad it helped you out!

I'll leave the instance running through April, with the plan being to shut it down on May 1st, so if there's anyone else that has the same issue, please use this to get your data while you can.

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

4 participants