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

File viewer does not work #117

Open
junwei-wang opened this issue Nov 25, 2020 · 18 comments
Open

File viewer does not work #117

junwei-wang opened this issue Nov 25, 2020 · 18 comments

Comments

@junwei-wang
Copy link

As you can see in the image:

Request to URL like http://127.0.0.1:8080/20201125095309-coding.html?token=null will return 404.

Screenshot 2020-11-25 at 10 59 28

Screenshot 2020-11-25 at 10 58 45

Configuration:

(setq org-roam-server-host "127.0.0.1"
      org-roam-server-port 8080
      org-roam-server-authenticate nil
      org-roam-server-export-inline-images t
      org-roam-server-serve-files nil
      org-roam-server-served-file-extensions '("pdf" "mp4" "ogv")
      org-roam-server-network-poll t
      org-roam-server-network-arrows nil
      org-roam-server-network-label-truncate t
      org-roam-server-network-label-truncate-length 60
      org-roam-server-network-label-wrap-length 20)

@goktug97
Copy link
Member

Can you try to export a document in your database to html using org-mode export function. C-c C-e h o default key presses.

@junwei-wang
Copy link
Author

junwei-wang commented Nov 25, 2020

Yes, I can, as it should be.

@goktug97
Copy link
Member

Can you try restarting your computer: #107

@junwei-wang
Copy link
Author

Yes, I will try latter. Meanwhile, this could be useful for debugging.

org-roam-server-root is a variable defined in org-roam-server.el.

Value
"/path/to/.emacs.d/.local/straight/build-27.1/org-roam-server/."
ls /path/to/.emacs.d/.local/straight/build-27.1/org-roam-server/.
assets                       org-roam-server.el
index.html                   org-roam-server.elc
org-roam-server-autoloads.el

@junwei-wang
Copy link
Author

junwei-wang commented Nov 25, 2020

It still does not work after rebooting.

I notice the following error reported in the minibuffer when enabling org_roam-server-mode

-contains?: Wrong type argument: listp, sp-text-mode-emoticon-p

@junwei-wang
Copy link
Author

Hi, I find this link https://www.gitmemory.com/issue/org-roam/org-roam-server/75/687602053.

When I had the 404 issue, I tried to enable org-roam-server in a daemon Emacs, which started by brew services. Now, if I tried to enable org-roam-server in non-deamon Emacs, the file viewer now.

With this information, could you figure out where the bug could come from?

@goktug97
Copy link
Member

As far as I remember it was related to smartparens #115

@roiholtzman
Copy link

I had the same issue after a fresh installation of doom emacs, and this 115 indeed solved it for me.

@roiholtzman
Copy link

This issue has reappeared for me.
I am using doom emacs, and I am not sure why it happens now. I still have the configuration given in 115, but it does not help anymore...

@goktug97
Copy link
Member

goktug97 commented Mar 21, 2021

What error are you getting? The same error?

Not Found
The requested URL was not found on this server.

@roiholtzman
Copy link

Yes, exactly.
However, I see the content of the backlinks...
Screen Shot 2021-03-18 at 16 22 34

@goktug97
Copy link
Member

For me, deleting org-roam.db and recreating it fixed the problem. Can you try it?

@junwei-wang
Copy link
Author

junwei-wang commented Mar 21, 2021 via email

@roiholtzman
Copy link

For me, deleting org-roam.db and recreating it fixed the problem. Can you try it?

I tried it, but it doesn't help.. I still get the same error.

@roiholtzman
Copy link

@goktug97 this is the http request I see in the emacs log

(request
 (date "Sun, 21 Mar 2021 09:56:52 GMT")
 (address "127.0.0.1")
 (get "/org-roam-buffer")
 (headers
  ("GET" "/org-roam-buffer?path=/Users/roiho/Dropbox%20(Weizmann%20Institute)/PHD/org-roam/20200924192709-rotator_get_different_geometric_phases_by_an_auxiliary_term.org&label=Rotator:%20get%20different%20geometric%20phases%20by%20an%20auxiliary%20term&token=null" "HTTP/1.1")
  ("Host" "localhost:8080")
  ("User-Agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:86.0) Gecko/20100101 Firefox/86.0")
  ("Accept" "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8")
  ("Accept-Language" "en-US,en;q=0.5")
  ("Accept-Encoding" "gzip, deflate")
  ("Connection" "keep-alive")
  ("Referer" "http://localhost:8080/")
  ("Upgrade-Insecure-Requests" "1")
  ("Content" "")))

in the beginning it tries (get "/org-roam-buffer"). is this ok?
also, later it asks for an org file and not an html file. it this ok?

@goktug97
Copy link
Member

@goktug97 this is the http request I see in the emacs log

(request
 (date "Sun, 21 Mar 2021 09:56:52 GMT")
 (address "127.0.0.1")
 (get "/org-roam-buffer")
 (headers
  ("GET" "/org-roam-buffer?path=/Users/roiho/Dropbox%20(Weizmann%20Institute)/PHD/org-roam/20200924192709-rotator_get_different_geometric_phases_by_an_auxiliary_term.org&label=Rotator:%20get%20different%20geometric%20phases%20by%20an%20auxiliary%20term&token=null" "HTTP/1.1")
  ("Host" "localhost:8080")
  ("User-Agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:86.0) Gecko/20100101 Firefox/86.0")
  ("Accept" "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8")
  ("Accept-Language" "en-US,en;q=0.5")
  ("Accept-Encoding" "gzip, deflate")
  ("Connection" "keep-alive")
  ("Referer" "http://localhost:8080/")
  ("Upgrade-Insecure-Requests" "1")
  ("Content" "")))

in the beginning it tries (get "/org-roam-buffer"). is this ok?
also, later it asks for an org file and not an html file. it this ok?

Is this a new issue for you? Did viewer work in the past? /Users/roiho/Dropbox%20(Weizmann%20Institute) Maybe the encoded path causing the problem. Can you try again by copying your roam folder to a local folder (not cloud) without any spaces and changing the path variable accordingly in emacs?

@roiholtzman
Copy link

@goktug97 this is the http request I see in the emacs log

(request
 (date "Sun, 21 Mar 2021 09:56:52 GMT")
 (address "127.0.0.1")
 (get "/org-roam-buffer")
 (headers
  ("GET" "/org-roam-buffer?path=/Users/roiho/Dropbox%20(Weizmann%20Institute)/PHD/org-roam/20200924192709-rotator_get_different_geometric_phases_by_an_auxiliary_term.org&label=Rotator:%20get%20different%20geometric%20phases%20by%20an%20auxiliary%20term&token=null" "HTTP/1.1")
  ("Host" "localhost:8080")
  ("User-Agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:86.0) Gecko/20100101 Firefox/86.0")
  ("Accept" "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8")
  ("Accept-Language" "en-US,en;q=0.5")
  ("Accept-Encoding" "gzip, deflate")
  ("Connection" "keep-alive")
  ("Referer" "http://localhost:8080/")
  ("Upgrade-Insecure-Requests" "1")
  ("Content" "")))

in the beginning it tries (get "/org-roam-buffer"). is this ok?
also, later it asks for an org file and not an html file. it this ok?

Is this a new issue for you? Did viewer work in the past? /Users/roiho/Dropbox%20(Weizmann%20Institute) Maybe the encoded path causing the problem. Can you try again by copying your roam folder to a local folder (not cloud) without any spaces and changing the path variable accordingly in emacs?

I don't know what solved the issue, but it is now working great! (among else I updated my doom emacs)

@roiholtzman
Copy link

@goktug97 this is the http request I see in the emacs log

(request
 (date "Sun, 21 Mar 2021 09:56:52 GMT")
 (address "127.0.0.1")
 (get "/org-roam-buffer")
 (headers
  ("GET" "/org-roam-buffer?path=/Users/roiho/Dropbox%20(Weizmann%20Institute)/PHD/org-roam/20200924192709-rotator_get_different_geometric_phases_by_an_auxiliary_term.org&label=Rotator:%20get%20different%20geometric%20phases%20by%20an%20auxiliary%20term&token=null" "HTTP/1.1")
  ("Host" "localhost:8080")
  ("User-Agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:86.0) Gecko/20100101 Firefox/86.0")
  ("Accept" "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8")
  ("Accept-Language" "en-US,en;q=0.5")
  ("Accept-Encoding" "gzip, deflate")
  ("Connection" "keep-alive")
  ("Referer" "http://localhost:8080/")
  ("Upgrade-Insecure-Requests" "1")
  ("Content" "")))

in the beginning it tries (get "/org-roam-buffer"). is this ok?
also, later it asks for an org file and not an html file. it this ok?

Is this a new issue for you? Did viewer work in the past? /Users/roiho/Dropbox%20(Weizmann%20Institute) Maybe the encoded path causing the problem. Can you try again by copying your roam folder to a local folder (not cloud) without any spaces and changing the path variable accordingly in emacs?

I don't know what solved the issue, but it is now working great! (among else I updated my doom emacs)

For some reason, it stopped working again. Now the request is empty:

(request
 (date "Sun, 11 Apr 2021 10:22:56 GMT")
 (address "127.0.0.1")
 (get "/roam-data")
 (headers
  ("GET" "/roam-data?token=null" "HTTP/1.1")
  ("Host" "localhost:8080")
  ("User-Agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:86.0) Gecko/20100101 Firefox/86.0")
  ("Accept" "text/event-stream")
  ("Accept-Language" "en-US,en;q=0.5")
  ("Accept-Encoding" "gzip, deflate")
  ("Connection" "keep-alive")
  ("Referer" "http://localhost:8080/")
  ("Cookie" "_xsrf=2|6bb1fce4|b5bc1f8bd8d658827fd5a7db71a66952|1616329630; username-localhost-8888=\"2|1:0|10:1616329634|23:username-localhost-8888|44:YTUyZjA2MzQxNGUyNGZlMGFiMTliNTM1MzRlODZiYjc=|b9b2f7b1adb43f02c92534eed7954e431b3d72bfe7796992063c759b35a0cb15\"")
  ("Pragma" "no-cache")
  ("Cache-Control" "no-cache")
  ("Content" "")))

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

3 participants