Git Product home page Git Product logo

airlatex.vim's People

Contributors

braun-steven avatar c3r34lk1ll3r avatar da-h avatar moetayuko avatar sbrodehl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

airlatex.vim's Issues

Still getting "Offline. Please Login"

I am using NeoVim.
I have tried using the cookie storage as described in #48
and also manually setting the cookie as:
let g:AirLatexUsername="cookies:GCLB=XXXXXXXXXXXX;overleaf_session2=s%YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"

Either way I am getting:
"Offline. Please Login. I saved the webpage 'https://www.overleaf.com' I got under /tmp/tmpo9wnotf2."

Error when logging in with username

Command: :AirLatex

Error detected while processing function remote#define#request:
line    2:
Error invoking '/home/acxz/.local/share/nvim/plugged/AirLatex.vim/rplugin/python3/test.py:command:AirLatex' on channel 4 (python
3-rplugin-host):
error caught in request handler '/home/acxz/.local/share/nvim/plugged/AirLatex.vim/rplugin/python3/test.py:command:AirLatex []':
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/secretstorage/util.py", line 46, in send_and_get_reply
    return self._connection.send_and_get_reply(msg, unwrap=True)
  File "/usr/lib/python3.10/site-packages/jeepney/io/blocking.py", line 190, in send_and_get_reply
    return unwrap_msg(msg_in)
  File "/usr/lib/python3.10/site-packages/jeepney/wrappers.py", line 214, in unwrap_msg
    raise DBusErrorResponse(msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path “/org/freedesktop
/secrets/collection/login”',)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/secretstorage/collection.py", line 161, in get_default_collection
    return Collection(connection)
  File "/usr/lib/python3.10/site-packages/secretstorage/collection.py", line 44, in __init__
    self._collection.get_property('Label')
  File "/usr/lib/python3.10/site-packages/secretstorage/util.py", line 64, in get_property
    (signature, value), = self.send_and_get_reply(msg)
  File "/usr/lib/python3.10/site-packages/secretstorage/util.py", line 49, in send_and_get_reply
    raise ItemNotFoundException('Item does not exist!') from resp

sysinfo:
python: 3.10.2
nvim: 0.6.1

Bug: can't escape statusbar

In list of projects I can put my cursor on Status: Online line, but after this I can't move it up on project names, I should type :q and :AirLatex again.

overleaf/document-updated applies wrong position

Example document:

123
456
789

server changes to:

123
abc
456
789

client changes to:

123
ghi
abc
456
789

However, web client receives:

123
g
hiabc
456
789

=> Evaluate why the position is wrong on the web client site.

'NoneType' object has no attribute 'encode'

After installing the plugin with Neovim and Vim Plug and running :AirLatex, it gives error " 'NoneType' object has no attribute 'encode' ". Maybe I don't have some python dependencies installed? (except for those specified in the readme)

Log in fails due to updateProjectList() failing to parse the projects page

When I try to log in (using the cookies method), I get the this error message:

Offline. Please Login. I saved the webpage 'https://www.overleaf.com' I got under /tmp/tmpmh97iu98.

This is what's in the log file:

            __init__ / openSidebar #31  : Starting AirLatex (Version 0.2)
            __init__ / openSidebar #32  : System Info:
            __init__ / openSidebar #33  :   - Python Version: 3.10
            __init__ / openSidebar #34  :   - OS: Linux (6.2.2-arch2-1)
                   session / login #98  : login()
                   session / login #139 : Found Cookie for domain 'overleaf_session2' named 'REDACTED'
       session / updateProjectList #169 : updateProjectList()

I checked session.py and it looks like updateProjectList() is looking for the project list in a meta tag with name=ol-projects:

            meta = re.search('<meta\s[^>]*name="ol-projects"[^>]*>', projectPage.text) if projectPage.ok else None

But the projects page on Overleaf no longer has that tag. I closest thing I found was a meta tag with name=ol-prefetchedProjectsBlob. I tried updating the code to use that tag instead but I got an error about missing attributes, so it looks like the format changed as well.

Send Recompile

:w sends recompile command in vim mode of the web client. Adapt that for vim

Login doesnt work

Im getting prompted to login, even if im logged in already. Doesnt change, when im relogging.
Connecting to overleaf seems to work.
Also i have browser_cookie3 installed via pip, is there a way to debug that ? There are no errors popping up from withing vim.

Cookie instructions are unclear

It took me a while to realise that the input when you set username to 'cookies' is expecting:

overleaf_session2=s%REDACTED (url encoded)

Perhaps the README could be updated with better instructions

Unknown Code:7:::1+0

AirLatex doesn't load any project just giving Unknown Code:7:::1+0.
Tried to set browser to Firefox using let g:AirLatexCookieBrowser="Firefox" and it didn't help.
AirLatex.log:

[DEBUG] airlatex.session #54: (Thread-1  ) login()
[DEBUG] airlatex.session #69: (Thread-1  ) Checking Browser 'Firefox' for Cookies at directory ''.
[DEBUG] airlatex.session #102: (Thread-1  ) updateProjectList()
[DEBUG] airlatex.sidebar #78: (MainThread) triggerRefresh() -> event called
[DEBUG] airlatex.sidebar #59: (MainThread) flush_refresh() -> called
[DEBUG] airlatex.session #149: (Thread-3  ) msg_queue : Connecting Project
[DEBUG] airlatex.sidebar #78: (MainThread) triggerRefresh() -> event called
[DEBUG] airlatex.sidebar #59: (MainThread) flush_refresh() -> called
[DEBUG] airlatex.session #210: (Thread-4  ) Websocket channelInfo 'GJnD3f7bbw9o2AmPMpx_:60:60:websocket,flashsocket,htmlfile,xhr-polling,jsonp-polling'
[DEBUG] airlatex.session #212: (Thread-4  ) Websocket wsChannel 'GJnD3f7bbw9o2AmPMpx_'
[DEBUG] airlatex.project_handler #224: (Thread-4  ) Websocket Connecting to wss://www.overleaf.com/socket.io/1/websocket/GJnD3f7bbw9o2AmPMpx_
[DEBUG] airlatex.project_handler #141: (Thread-4  ) starting sendOps_flush()
[DEBUG] airlatex.project_handler #151: (Thread-4  ) sendOps_flush() -> waiting
[DEBUG] airlatex.project_handler #241: (Thread-4  ) 7:::1+0
[DEBUG] airlatex.session #149: (Thread-3  ) msg_queue : Connected.
[DEBUG] airlatex.project_handler #241: (Thread-4  ) None
[DEBUG] airlatex.session #149: (Thread-3  ) msg_queue : Unknown Code:7:::1+0
[DEBUG] airlatex.sidebar #78: (MainThread) triggerRefresh() -> event called
[DEBUG] airlatex.sidebar #59: (MainThread) flush_refresh() -> called
[DEBUG] airlatex.sidebar #78: (MainThread) triggerRefresh() -> event called
[DEBUG] airlatex.sidebar #59: (MainThread) flush_refresh() -> called
[DEBUG] airlatex.session #44: (MainThread) cleanup()
[DEBUG] airlatex.project_handler #213: (MainThread) Connection Closed
[DEBUG] airlatex.project_handler #207: (MainThread) triggerSidebarRefresh()
[DEBUG] airlatex.session #149: (Thread-3  ) msg_queue : Disconnected.

scr

Stuck connecting

When using the :AirLatex command, I get stuck on a screen looking like this:

AirLatex
========




Status      : Connecting
Last Update : 08:21:00
Quit All    : enter

It also displays an error in the bottom E490: No fold found.

I've followed the installation steps, tried reinstalling the plugin but I still get stuck.
I am logged in on both Firefox and Chromium, I've tried specifying the browser let g:AirLatexCookieBrowser with no luck.

I wish I could help, this plugin looks amazing, but I know very little about writing vim plugins. Do you have a good resource to get started?

Overleaf CAPTCHA

Tried to log in to overleaf.com using username and password and received this message in return:

{"errorReason":"cannot_verify_user_not_robot","message":{"text":"Sorry, we could not verify that you are not a robot. Please check that Google reCAPTCHA is not being blocked by an ad blocker or firewall."}}

Similarly, entering the session cookie results in status: 'Error: 'Task exception was never retrieved'.'

Vim 8 support

Hey David, thanks for working on this plugin!

After logging into overleaf and opening a project and running :call Airlatex(), the sidebar pops up and :messages is populated with the following error:

Error detected while processing function AirLatex_project_update:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/tak/.vim/plugged/AirLatex.vim/python/sidebar.py", line 459, in <module> sidebar.triggerRefresh()
  File "/home/tak/.vim/plugged/AirLatex.vim/python/sidebar.py", line 46, in triggerRefresh vim.async_call(refresh)
AttributeError: module 'vim' has no attribute 'async_call'

This error continues to pop up when I want to navigate in the AirLatex sidebar. No connection can be established.

Here is the output of vim --version if it helps you:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 29 2019 22:27:49)
Included patches: 1-2102
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
+acl               -farsi             -mouse_sysmouse    -tag_any_white
+arabic            +file_in_path      +mouse_urxvt       +tcl/dyn
+autocmd           +find_in_path      +mouse_xterm       +termguicolors
+autochdir         +float             +multi_byte        +terminal
-autoservername    +folding           +multi_lang        +terminfo
-balloon_eval      -footer            -mzscheme          +termresponse
+balloon_eval_term +fork()            +netbeans_intg     +textobjects
-browse            +gettext           +num64             +textprop
++builtin_terms    -hangul_input      +packages          +timers
+byte_offset       +iconv             +path_extra        +title
+channel           +insert_expand     +perl/dyn          -toolbar
+cindent           +job               +persistent_undo   +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +virtualedit
+cmdline_hist      +langmap           +python/dyn        +visual
+cmdline_info      +libcall           +python3/dyn       +visualextra
+comments          +linebreak         +quickfix          +viminfo
+conceal           +lispindent        +reltime           +vreplace
+cryptv            +listcmds          +rightleft         +wildignore
+cscope            +localmap          +ruby/dyn          +wildmenu
+cursorbind        +lua/dyn           +scrollbind        +windows
+cursorshape       +menu              +signs             +writebackup
+dialog_con        +mksession         +smartindent       -X11
+diff              +modify_fname      -sound             -xfontset
+digraphs          +mouse             +spell             -xim
-dnd               -mouseshape        +startuptime       -xpm
-ebcdic            +mouse_dec         +statusline        -xsmp
+emacs_tags        +mouse_gpm         -sun_workshop      -xterm_clipboard
+eval              -mouse_jsbterm     +syntax            -xterm_save
+ex_extra          +mouse_netterm     +tag_binary        
+extra_search      +mouse_sgr         -tag_old_static    
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.30/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L/usr/local/lib -Wl,--as-needed -o vim        -lm -ltinfo -lelf -lnsl    -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.30/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/5.30/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc   -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm

Let me know if I can provide more information.

Additional information:

  • Firefox Version: 70.0.1
  • OS: Arch Linux (Kernel 5.3.7, Zen)
  • Minimal .vimrc:
call plug#begin('~/.vim/plugged')
  Plug 'da-h/AirLatex.vim'
call plug#end()
let g:airlatex_domain="www.overleaf.com"

Edit: Adjusted the airlatex_domain to Overleaf and it now works in NeoVim.

Recompilation from AirLatex.vim

Creating an issue because it is directly address in the readme.

I got recompile working (in terms of requests, see dmadisetti@d3f621b

BUT, this does not refresh the PDF in browser. I cannot find a hook that will allow us to remotely refresh the browser either. There is a compile response, but this change just ignores it.
The best way I have found to get changes to show in overleaf is just to turn on autocompile, which doesn't need an additional compile request.

Set Cookies Automatically from Firefox Cookie store

This is something that I am using (it's particular to firefox, chromium based browsers encrypt their cookies on disk):

let g:AirLatexCookieDB="/home/dylan/.mozilla/firefox/*.default/cookies.sqlite"                                                                                                                                                                
let g:AirLatexSecret = trim(system("sqlite3 " . g:AirLatexCookieDB . " 'select value from main.moz_cookies where name=\"overleaf_session2\" and host=\".overleaf.com\";'"))                                                                   
let g:AirLatexLB = trim(system("sqlite3 " . g:AirLatexCookieDB . " 'select value from main.moz_cookies where name=\"GCLB\" and host=\".overleaf.com\";'"))                                                                                    
let g:AirLatexUsername = "cookies:GCLB=" . g:AirLatexLB . ";overleaf_session2=" . g:AirLatexSecret

Just thought I would share!

Deleted projects also shown

Deleted months ago projects also shown in menu, but I think it is an overleaf's API problem, so, something needs to be done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.