onlinemediagroup / ocaml-usbmux Goto Github PK
View Code? Open in Web Editor NEWConnect to your iDevices over USB at scale
Connect to your iDevices over USB at scale
When I unplug a device and plug it back in the tunnel does not open and I have to restart gandalf. Is this the normal behavior?
This is on High Sierra
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ๐ซ
[ERROR] The compilation of usbmux failed at "ocaml setup.ml -build".
Processing 1/1: [usbmux: ocaml]
#=== ERROR while installing usbmux.1.3.2 ======================================#
# opam-version 1.2.2
# os darwin
# command ocaml setup.ml -build
# path /Users/macbook/.opam/system/build/usbmux.1.3.2
# compiler system (4.06.0)
# exit-code 1
# env-file /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.env
# stdout-file /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.out
# stderr-file /Users/macbook/.opam/system/build/usbmux.1.3.2/usbmux-52213-c61e7b.err
### stdout ###
# [...]
# ocamlfind ocamlopt unix.cmxa -I /Users/macbook/.opam/system/lib/ocamlbuild /Users/macbook/.opam/system/lib/ocamlbuild/ocamlbuildlib.cmxa -linkpkg myocamlbuild.ml /Users/macbook/.opam/system/lib/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# /Users/macbook/.opam/system/bin/ocamlfind ocamldep -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -modules src/lib/usbmux.mli > src/lib/usbmux.mli.depends
# /Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmi src/lib/usbmux.mli
# /Users/macbook/.opam/system/bin/ocamlfind ocamldep -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -modules src/lib/usbmux.ml > src/lib/usbmux.ml.depends
# /Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
# + /Users/macbook/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package ppx_deriving -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -package cohttp -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
# File "src/lib/usbmux.ml", line 158, characters 35-41:
# Error: This expression has type bytes but an expression was expected of type
# string
# Command exited with code 2.
### stderr ###
# E: Failure("Command ''/Users/macbook/.opam/system/bin/ocamlbuild' src/lib/usbmux.cma src/lib/usbmux.cmxa src/lib/usbmux.a src/lib/usbmux.cmxs src/app/main.native -use-ocamlfind -tag debug' terminated with error code 10")
AFAICT it'll only listen on the loopback atm.
The post installation OPAM message should only be displayed on success as in https://github.com/the-lambda-church/merlin/blob/master/opam#L50 (you will probably want to make it a single string to not annotate all of them).
Also, if you want it to be automatically added up by oasis2opam
, put the section post-messages: [ ... ]
in an _opam
file alongside _oasis
.
Here's what's printed out.
Canors-Mac-mini:~ Canor$ opam install usbmux
The following actions will be performed:
โ install ocamlmod 0.0.8 [required by oasis]
โ install biniou 1.0.12 [required by yojson]
โ install stringext 1.4.2 [required by usbmux]
โ install lwt 2.5.2 [required by usbmux]
โ install base64 2.0.0 [required by cohttp]
โ install magic-mime 1.0.0 [required by cohttp]
โ install ppx_deriving 3.3 [required by ppx_type_conv]
โ install ocplib-endian 1.0 [required by cstruct]
โ install re 1.6.1 [required by cohttp]
โ install ppx_core 113.33.01+4.03 [required by ppx_fields_conv]
โ install sexplib 113.33.00+4.03 [required by cohttp]
โ install fieldslib 113.24.00 [required by cohttp]
โ install ocamlify 0.0.1 [required by oasis]
โ install yojson 1.3.2 [required by usbmux]
โ install markup 0.7.2 [required by lambdasoup]
โ install ppx_optcomp 113.33.00+4.03 [required by conduit]
โ install cstruct 2.3.0 [required by conduit]
โ install oasis 0.4.7 [required by usbmux]
โ install lambdasoup 0.6 [required by plist]
โ install ppx_driver 113.33.01+4.03 [required by conduit]
โ install plist 0.1 [required by usbmux]
โ install ppx_type_conv 113.33.01+4.03 [required by ppx_fields_conv]
โ install ppx_sexp_conv 113.33.01+4.03 [required by cohttp]
โ install ppx_fields_conv 113.33.00+4.03 [required by cohttp]
โ install uri 1.9.2 [required by cohttp]
โ install ipaddr 2.7.0 [required by conduit]
โ install conduit 0.12.0 [required by cohttp]
โ install cohttp 0.21.0 [required by usbmux]
โ install usbmux 1.1.1
===== โ 29 =====
Do you want to continue ? [Y/n] y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[base64] Archive in cache
[biniou] Archive in cache
[cohttp] Archive in cache
[conduit] Archive in cache
[cstruct] Archive in cache
[fieldslib] Archive in cache
[ipaddr] Archive in cache
[lambdasoup] Archive in cache
[lwt] Archive in cache
[magic-mime] Archive in cache
[markup] Archive in cache
[oasis] Archive in cache
[ocamlify] Archive in cache
[ocamlmod] Archive in cache
[ocplib-endian] Archive in cache
[plist] Archive in cache
[ppx_core] Archive in cache
[ppx_deriving] Archive in cache
[ppx_driver] Archive in cache
[ppx_fields_conv] Archive in cache
[ppx_optcomp] Archive in cache
[ppx_sexp_conv] Archive in cache
[ppx_type_conv] Archive in cache
[re] Archive in cache
[sexplib] Archive in cache
[stringext] Archive in cache
[uri] Archive in cache
[usbmux] Archive in cache
[yojson] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#=== ERROR while installing base64.2.0.0 ======================================#
# opam-version 1.2.2
# os darwin
Extracting the archive will overwrite /Users/Canor 1/.opam/system/build/base64.2.0.0.
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
โ install biniou 1.0.12
โ install cohttp 0.21.0
โ install conduit 0.12.0
โ install cstruct 2.3.0
โ install fieldslib 113.24.00
โ install ipaddr 2.7.0
โ install lambdasoup 0.6
โ install lwt 2.5.2
โ install magic-mime 1.0.0
โ install markup 0.7.2
โ install oasis 0.4.7
โ install ocamlify 0.0.1
โ install ocamlmod 0.0.8
โ install ocplib-endian 1.0
โ install plist 0.1
โ install ppx_core 113.33.01+4.03
โ install ppx_deriving 3.3
โ install ppx_driver 113.33.01+4.03
โ install ppx_fields_conv 113.33.00+4.03
โ install ppx_optcomp 113.33.00+4.03
โ install ppx_sexp_conv 113.33.01+4.03
โ install ppx_type_conv 113.33.01+4.03
โ install re 1.6.1
โ install sexplib 113.33.00+4.03
โ install stringext 1.4.2
โ install uri 1.9.2
โ install usbmux 1.1.1
โ install yojson 1.3.2
The following actions failed
โ install base64 2.0.0
No changes have been performed
it's OSX 10.11.6, opam compiler 4.03.0 installed via homebrew, however Terminal prints
The environment is not in sync with the current switch.
You should run: eval `opam config env`
when I type opam switch
.
After following the command, gandalf is not found.
It seems that the opam does not insert .opam/system/bin/ into PATH environment variable. Maybe add this to the readme?
this is my command:
gandalf -m '/Users/ahmadalli/Projects/Laboratory/Laboratory/gandalf/mapping.json' --log_async_exceptions --log_connections --log_everything_else --log_plugged_action --ignore_all_unix_exceptions
this is my gandalf error output:
gandalf: everything_else: Check if already running tunneling relay, probably are
I'm running gandalf -m {mappingFileLocation} --log_async_exceptions --log_connections --log_everything_else --log_plugged_action
and this is what I get:
gandalf: plugged_inout: Device 45 with serial number: <id> connected
gandalf: connections: Tunneling. Udid: <id> Local Port: 2000 Device Port: 22 Device_id: 45
gandalf: connections: Tunneling. Udid: <id> Local Port: 2000 Device Port: 22 Device_id: 45
gandalf: connections: Tunneling. Udid: <id> Local Port: 2003 Device Port: 5900 Device_id: 45
gandalf: everything_else: Unix based error: Broken pipe
Exited with 1 still running; this is a bug.
I know there's a workaround: ignoring unix errors
The following dependencies couldn't be met:
No solution found, exiting
Any ideas ?
Hi,
While compiling on OSX I get the following:
File "src/lib/usbmux.ml", line 260, characters 9-336:
Error: This expression has type
(Yojson.Safe.json Lazy.t * ([<Error of string |
Ok of 'b ] as 'a))
list -> 'b list
but an expression was expected of type
(Yojson.Safe.json Lazy.t *
tunnel Ppx_deriving_yojson_runtime.error_or)
list -> 'c
Type 'a is not compatible with type
tunnel Ppx_deriving_yojson_runtime.error_or =
(tunnel, string) Result.result`
Hello!
What I doing wrong?
~/gandalf_src/ocaml-usbmux # make
ocaml setup.ml -build
W: File src/lib/META has changed, doing a backup in src/lib/META.bak
Finished, 1 target (0 cached) in 00:00:00.
+ /root/.opam/system/bin/ocamlfind ocamlc -c -g -annot -bin-annot -g -w +a-4-40..42-44-45-48 -thread -package yojson -package threads -package ppx_deriving_yojson -package plist -package lwt.unix -package lwt.preemptive -package lwt.ppx -package cohttp.lwt -I src/lib -o src/lib/usbmux.cmo src/lib/usbmux.ml
File "src/lib/usbmux.ml", line 260, characters 9-336:
Error: This expression has type
(Yojson.Safe.json Lazy.t * ([< `Error of string | `Ok of 'b ] as 'a))
list -> 'b list
but an expression was expected of type
(Yojson.Safe.json Lazy.t *
tunnel Ppx_deriving_yojson_runtime.error_or)
list -> 'c
Type 'a is not compatible with type
tunnel Ppx_deriving_yojson_runtime.error_or =
(tunnel, string) Result.result
Command exited with code 2.
Compilation unsuccessful after building 4 targets (0 cached) in 00:00:00.
E: Failure("Command ''/usr/bin/ocamlbuild' src/lib/usbmux.cma src/lib/usbmux.cmxa src/lib/usbmux.a src/lib/usbmux.cmxs src/app/main.native -use-ocamlfind -tag debug' terminated with error code 10")
Makefile:7: recipe for target 'build' failed
make: *** [build] Error 1
Mar 23 22:12:38 conquest gandalf[21356]: main: Exited with 19 still running; this is a bug.
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: Called from file "src/core/lwt.ml", line 781, characters 66-71
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: Called from file "src/core/lwt.ml", line 1150, characters 14-18
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: Called from file "src/unix/lwt_io.ml", line 1387, characters 28-36
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: Re-raised at file "camlinternalLazy.ml", line 32, characters 10-11
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: Called from file "camlinternalLazy.ml", line 25, characters 17-27
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: Raised at file "camlinternalLazy.ml", line 18, characters 48-57
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: backtrace:
Mar 23 22:12:38 conquest gandalf[21356]: async_exceptions: Please report, this is an unhandled async exception (A bug): CamlinternalLazy.Undefined
I think its an issue of
(* Finished tunneling, now cleanly close the chans *)
>>= close_chans (tcp_ic, tcp_oc)
|> Lwt.ignore_result
in usbmux.ml
because lwt's establish_server
has its own logic on closing the server's connections and uses lazy
in its implementation.
After I install gandalf, I can't find mapping file under ~/etc/, but I create a new mapping file under ~/etc,which system still tell me no mapping file.
Where I should create the mapping file? Or gandalf install failed?
this is my configuration.
[
{
"udid": "device_id",
"name": "iPad jail 10.2 (32GB)",
"forwarding": [
{
"device_port": 22,
"local_port": 2000
},
{
"device_port": 5900,
"local_port": 2001
}
]
}
]
when I try telnet 127.0.0.1 2001
I'm getting
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
but without the first mapping everything's fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.