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

BOSH/HTTP transport for client #561

Open
sonnyp opened this issue Aug 31, 2018 · 8 comments
Open

BOSH/HTTP transport for client #561

sonnyp opened this issue Aug 31, 2018 · 8 comments

Comments

@sonnyp
Copy link
Member

sonnyp commented Aug 31, 2018

No description provided.

@174n
Copy link

174n commented Apr 3, 2019

any hope for implementing it?

@sonnyp sonnyp changed the title BOSH transport for client BOSH/HTTP transport for client Nov 23, 2019
@sonnyp sonnyp removed the could label Sep 16, 2020
@IrfDev
Copy link

IrfDev commented May 31, 2021

Any update?

@VA1DER
Copy link

VA1DER commented Aug 18, 2023

Is this still a goal of the project?
Interestingly, Prosody documentation thinks that xmpp.js supports BOSH already and it's listed as a tested client library.

@vampirefrog
Copy link

Is this project still active? I'd like to implement BOSH support, but I'll need someone to help me with that.

@sonnyp
Copy link
Member Author

sonnyp commented Dec 16, 2023

PR welcome - I'm happy to review it.

I wrote a BOSH client before - you can reuse the code https://github.com/sonnyp/lightstring/blob/master/src/transports/bosh.js

It should use fetch instead of XMLHttpRequest though and @xmpp/xml for xml.

@vampirefrog
Copy link

Well, I'm not sure where to start, running npm install comes up with this error:

$ npm i
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated iltorb@2.4.5: The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 1
npm ERR! path /home/vampi/Code/xmpp.js/node_modules/iltorb
npm ERR! command failed
npm ERR! command sh -c node ./scripts/install.js || node-gyp rebuild
npm ERR! info install installing standalone, skipping download.
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@5.1.1
npm ERR! gyp info using node@18.13.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.11.2 found at "/usr/bin/python"
npm ERR! (node:920343) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/vampi/Code/xmpp.js/node_modules/iltorb/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/vampi/Code/xmpp.js/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/vampi/.cache/node-gyp/18.13.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/vampi/.cache/node-gyp/18.13.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/home/vampi/Code/xmpp.js/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/vampi/.cache/node-gyp/18.13.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/home/vampi/Code/xmpp.js/node_modules/iltorb',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Traceback (most recent call last):
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
npm ERR!     sys.exit(gyp.script_main())
npm ERR!              ^^^^^^^^^^^^^^^^^
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
npm ERR!     return main(sys.argv[1:])
npm ERR!            ^^^^^^^^^^^^^^^^^^
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
npm ERR!     return gyp_main(args)
npm ERR!            ^^^^^^^^^^^^^^
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
npm ERR!     [generator, flat_list, targets, data] = Load(
npm ERR!                                             ^^^^^
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
npm ERR!     result = gyp.input.Load(build_files, default_variables, includes[:],
npm ERR!              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
npm ERR!     LoadTargetBuildFile(build_file, data, aux_data,
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
npm ERR!     build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
npm ERR!                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR!   File "/home/vampi/Code/xmpp.js/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
npm ERR!     build_file_contents = open(build_file_path, 'rU').read()
npm ERR!                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! ValueError: invalid mode: 'rU' while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/home/vampi/Code/xmpp.js/node_modules/node-gyp/lib/configure.js:351:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 6.1.0-14-amd64
npm ERR! gyp ERR! command "/usr/bin/node" "/home/vampi/Code/xmpp.js/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /home/vampi/Code/xmpp.js/node_modules/iltorb
npm ERR! gyp ERR! node -v v18.13.0
npm ERR! gyp ERR! node-gyp -v v5.1.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vampi/.npm/_logs/2023-12-17T00_17_18_712Z-debug-0.log

$ npm --version
9.2.0

$ node --version
v18.13.0

@sonnyp
Copy link
Member Author

sonnyp commented Dec 17, 2023

Some dependency is pulling iltorb which doesn't build with your npm/node versions.
Since the repo is archived - your best best is finding which dependency depends on iltorb and look for an update or workaround.

@vampirefrog
Copy link

Nevermind, I just threw my own BOSH/XMPP client together so I don't have to deal with all the npm nonsense. Just FYI, the package failing is bundlesize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants