Giter Club home page Giter Club logo

Comments (8)

sbmueller avatar sbmueller commented on May 31, 2024 4

I can't find the example for deploying a server at all. The link https://github.com/jbyuki/instant.nvim/wiki/Deploy-a-server doesn't seem to exist.

from instant.nvim.

niveK77pur avatar niveK77pur commented on May 31, 2024 2

I had a look at the commit history for the wiki page, and it seems the last commit there (as of today June 20, 2022) deleted the file for https://github.com/jbyuki/instant.nvim/wiki/Deploy-a-server. Hard to say if that was an accident or done on purpose because the info there is maybe outdated by now and does not work anymore.

$ git clone https://github.com/jbyuki/instant.nvim.wiki.git
$ cd instant.nvim.wiki/
$ git log --format=reference | head
b022417 (Destroyed Deploy a server (markdown), 2022-05-03)
03e96e2 (Updated Protocol (markdown), 2021-03-06)
ddc33d2 (Updated Protocol (markdown), 2021-03-06)
c232d47 (Updated Protocol (markdown), 2021-03-06)
96c3787 (Updated Commands (markdown), 2021-03-06)
adba71e (Updated Deploy a server (markdown), 2021-01-06)
d3707b7 (Updated Deploy a server (markdown), 2021-01-05)
b9fe3a0 (Updated Deploy a server (markdown), 2021-01-04)
c9d8bde (Updated Deploy a server (markdown), 2021-01-04)
1780f38 (Created Persistent Data (markdown), 2021-01-04)

At any rate, you can revert this deletion as follows. It will restore the Deploy-a-server.md which seems to contain the instructions.

$ git revert --no-edit b022417
[master dc95d66] Revert "Destroyed Deploy a server (markdown)"
 Date: Mon Jun 20 21:59:45 2022 +0200
 1 file changed, 90 insertions(+)
 create mode 100644 Deploy-a-server.md

I am on Linux, but the ngrok method does not seem to work either. Not sure if the issue is related to that of @TheLeoP, but in my case it does not seem to spit out any errors. It simply does nothing at all. Not even a GET / appears on ngrok (if I try to curl the link, a GET / appears).

Please note, I installed this plugin a few minutes ago, maybe I am missing something to get it to work.

If the deletion was intentional, I will be glad to delete this comment. In the meantime it can serve to retrieve the file.

from instant.nvim.

rag-hav avatar rag-hav commented on May 31, 2024

@niveK77pur ngrok does work

PC 1

Vim

  • Start server :InstantStartServer
  • Start Share :InstantStartSingle 0.0.0.0 8080

terminal

  • ngrok tcp 8080
  • copy the url

PC 2

Vim

  • Join :InstantJoinSingle 0.tcp.ngrok.io 1821 (for example)

from instant.nvim.

niveK77pur avatar niveK77pur commented on May 31, 2024

@rag-hav Thank you for your message! I see you are using TCP, does it also work for HTTP? (ngrok said I cannot use tcp until I create an account). So I am running ngrok http 8080 instead (PC 1).

Also just to clarify, when you say copy the url it is the one from Forwarding right? In my case it says something like https://1bf0-88-206-141-152.eu.ngrok.io -> http://localhost:8080 (note it says https, not sure if that's an issue. In the example they were showing it says http). So in the second PC I do :InstantJoinSingle 1bf0-88-206-141-152.eu.ngrok.io and it does nothing. :InstantStatus says Disconnected. (PC 2); on the first PC it says Connected. 0 other client(s)

The only other difference I see is that you are specifying a port on the second PC (you say 1821). Is it taken from the Web Interface entry? It says http://127.0.0.1:4040 for me, but adding 4040 or 8080 to the :InstantJoinSingle command also has no effect. (not sure if the port is specific to tcp in this case).


I just noticed, if I wait long enough after the join command, it eventually spits out this error message about a time out. In case that can help.

Error executing vim.schedule lua callback: ...im/plugged/instant.nvim/lua/instant/websocket_client.lua:92: There was an error during connection: ETIMEDOUT
stack traceback:
        [C]: in function 'error'
        ...im/plugged/instant.nvim/lua/instant/websocket_client.lua:92: in function 'cb'
        vim.lua:285: in function <vim.lua:285>

I glanced at the lua/instant/websocket_client.lua file at line 92 according to the above error. I see that this block of code is running inside a client:connect which leads me to line 68 where client is defined. It says

local client = vim.loop.new_tcp()

Does it mean it only works with TCP? I cannot use HTTP to make it work? In which case I might consider making an account to see if it actually works then. Or I might look into the second more complicated looking solution using Heroku if that can make any difference.

from instant.nvim.

rag-hav avatar rag-hav commented on May 31, 2024

@niveK77pur

The only other difference I see is that you are specifying a port on the second PC (you say 1821). Is it taken from the Web Interface entry? It says http://127.0.0.1:4040 for me, but adding 4040 or 8080 to the :InstantJoinSingle command also has no effect. (not sure if the port is specific to tcp in this case).

With ngrok tcp you get a hostname and a port, which is different from Web Interface. But with HTTP you only get a hostname since the port for HTTP is always 80 by default.

For HTTP do this-

PC 1

Vim

  • Start server :InstantStartServer
  • Start Share :InstantStartSingle 0.0.0.0 8080

terminal

PC 2

Vim

  • Join :InstantJoinSingle foobar.ngrok.io 80 (for example)

from instant.nvim.

niveK77pur avatar niveK77pur commented on May 31, 2024

Join :InstantJoinSingle foobar.ngrok.io 80 (for example)

Thank you again @rag-hav! This port 80 is something that must have slipped my attention. However, I just tried that and still no success 🤔

I can ping the foobar.ngrok.io just fine though but running :InstantJoinSingle 1bf0-88-206-141-152.eu.ngrok.io 80 (for example) still reports Disconnected. I am getting unsure now where the issue exactly lies. It doesn't seem to be ngrok from what I gather here, but given what you tell me, it's probably not instant.nvim either... I'm not exactly sure where to look for now to trouble shoot this

from instant.nvim.

rag-hav avatar rag-hav commented on May 31, 2024

@niveK77pur Well just on the off chance that you are making a mistake on some step. Here is a video

https://drive.google.com/file/d/1UJDoKDvJYCfCiTIFzaX3FcgcdvSAgO00/view?usp=sharing

from instant.nvim.

niveK77pur avatar niveK77pur commented on May 31, 2024

Thank you so much again @rag-hav! I have spotted the culprit thanks to your video. There are 2 things that differ on both our ends.

  1. Your version of ngrok is 2.3.40. Mine is 3.0.5. But I believe this not to be an issue.
  2. You have two Forwarding entries. One with http, and another with https. I only see a single entry with https.

I see the URL is otherwise the same, so I suppose the issue is that I am not receiving an http tunnel (which seems to be part of the free subscription).

I have just gone ahead and created an ngrok account because it does seem quite cool. And I got it to work with TCP now!


However, I still don't see the http forwarding for ngrok, only https. I suppose there is an issue with my ngrok? or I need to configure something? or is it because I am in the EU? This is not related to this plugin anymore though.

Also keep in mind, I did not open this issue. So I am not sure if my discoveries here could help resolve the initial problem raised.

from instant.nvim.

Related Issues (20)

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.