Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Solved] Node/npm WebRTC/Webtorrent not working

Featured Replies

Hi guys,
does anyone have an experience with running webtorrent-hybrid or webtorren-cli  (https://www.npmjs.com/package/webtorrent-cli) on Olinuxino MICRO or similar?
I have installed npm package,  started seeding, but instant.io doesn detect my  peer. The same example works on desktop without an issue. 
Can anyone try and confirm if it is working or not on A20 boards?

  • Author

Hi everyone, 
does webtorrent-cli work on A20 boards? Olinuxino Micro specifically. I have installed node, webtorrent-cli, no errors while installing or running,  but peers do not get discovered by instant.io. The same example works fine on desktop PC, in a same network.  Any idea what is missing, or is it doable at all?

@Alexey,

 

Please do not multi-post the same issue in different sub-forums.

 

I merged both your posts together here, and moved the new combined thread to Common Issues subforum as I suspect it is going to be general software related rather than board or Armbian specific. If that proves not to be the case after further diagnosis, we can always move it back, later.

 

Back to the issue at hand, are you sure the appropriate ports are open/forwarded on your firewall, etc.?

  • Author
20 minutes ago, TRS-80 said:

 

Please do not multi-post the same issue in different sub-forums.
I merged both your posts together here

thanks a lot for pointing the right place!

Threre are three machines behind the same NAT, running the same (?) webtorrent-cli. 2 of them work fine, one does not.  Decided to start with platform specifics.  I  suspect 2 possible reasons - WebRTC  does not work  and i dont know how to diagnose it,  that's why I'm asking if  somewone can cofirm that it's working, or something is blocking peer connections on the OS. Does the OS have SELinux enabled in restriction mode? 

3 minutes ago, Alexey said:

Does the OS have SELinux enabled in restriction mode?

 

I do not know the answer to this. Maybe someone will come along who does. My suspicion is "no" however.

 

In general, I think you are on the right track. Look at what else is common with problem device, that is not in common with other 2 that are working, etc...

 

Good luck with your problem, sorry I could not help more as I have no experience with this.

 

Do remember to post solution if/when you find one, to help others in future! :)

  • Author

Hi there, 
after days of researching I have finally found what caused the issue. 
Checked if STUN is working with my NAT - works fine  (stunclient --mode=full stun.stunprotocol.org reports success).
Checked if arm7 version of webrtc library is installed ("export TARGET_ARCH=arm" before npm install).
Compared the debug output of webtorrent (DEBUG=bittorrent-tracker:client webtorrent) of working and non-working setups. Bingo! WebSocketTracker output was missing on malfunctioning system. After analyzing the source code, realized that the only reason why it may happen is different behavior of API functions. Yes, outdated Node.js.
Solution is upgrade to Node.js 10.0+ as shown here:
https://joshtronic.com/2018/05/08/how-to-install-nodejs-10-on-ubuntu-1804-lts/

After upgrade i can seed files with streaming webtorrent, works as a charm. 
 

  • TRS-80 changed the title to [Solved] Node/npm WebRTC/Webtorrent not working
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.