Sziasztok!
Adott egy STF (Smartphone Test Farm) nevű web alkalmazás. Egy 10.15.6-os macOS-re kellene felvarázsolnom. Soha nem használtam korábban + az előfeltételei közül többnek a nevét nem is hallottam eddig.
A github-os leírás megszab pár előfeltételt:
RethinkDB >= 2.2
GraphicsMagick (for resizing screenshots)
ZeroMQ libraries installed
Protocol Buffers libraries installed
yasm installed (for compiling embedded libjpeg-turbo)
pkg-config so that Node.js can find the libraries
Ezeket brew-val felraktam:
rethinkdb graphicsmagick zeromq protobuf yasm pkg-config
További 2 követelmény:
ADB properly set up
Node.js 8.x required (some dependencies don't support newer versions)
Az ADB-t így tettem fel: brew cask install android-platform-tools
A Node.js-nél pedig a 64 bites node-v8.11.1.pkg-t letöltöttem és telepítettem GUI-ról.
Az stf progit így akartam feltenni rootként:
npm install -g stf
Elkezdte a telepítést, majd egy pont után perceken át csak futott vmi szöveg a képernyőn. 1 idő után meguntam és megszakítottam a futását. Mint kiderült, ugyanazt ismételgette:
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/lib/node_modules/stf/node_modules/dtrace-provider/.node-gyp/8.11.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/stf/node_modules/dtrace-provider/.node-gyp"
Mint kiderült a végén lévő .node-gyp mappa nem is létezett, azt manuálisan létrehoztam.
Utána a biztonság kedvéért leszedtem az stf-et: npm uninstall -g stf
Majd ismét felraktam: npm install -g stf
Ekkor végigment rendesen a telepítő. (Vagyis nekem úgy tűnik.) Eléggé gány és barkács megoldásnak találom, hogy ilyen trükközések kellenek, hogy lefusson egy telepítő.
Ezt követően elindítottam a rethinkdb-t:
Running rethinkdb 2.4.0 (CLANG 11.0.3 (clang-1103.0.32.62))...
Running on Darwin 19.6.0 x86_64
Loading data from directory /Users/felhasznalo/rethinkdb_data
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080
Listening on cluster addresses: 127.0.0.1, ::1
Listening on driver addresses: 127.0.0.1, ::1
Listening on http addresses: 127.0.0.1, ::1
To fully expose RethinkDB on the network, bind to all addresses by running rethinkdb with the `--bind all` command line option.
Server ready, "masina_local_iln" 89a5ad15-34c6-535b-bca0-f2d321cdc121
Majd egy másik terminal ablakból kiadtam, hogy stf local
Elindul látszólag rendesen, majd egy pont után dob egy ilyet:
FTL/cli:local 17104 [*] Child process had an error Exit
Error: Exit code "1"
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/stf/lib/util/procut
il.js:49:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
2020-07-24T11:14:49.815Z INF/cli:local 17104 [*] Shutting down all child process
es
/usr/local/lib/node_modules/stf/lib/cli triproxy [name]
Options:
-h, --help Show help. [boolean]
-V, --version Show version. [boolean]
--bind-dealer, -d The address to bind the ZeroMQ DEALER endpoint to.
[string] [default: "tcp://*:7112"]
--bind-pub, -u The address to bind the ZeroMQ PUB endpoint to.
[string] [default: "tcp://*:7111"]
--bind-pull, -p The address to bind the ZeroMQ PULL endpoint to.
[string] [default: "tcp://*:7113"]
--name An easily identifiable name for log output.
[string] [default: "masina.local"]
Each option can be be overwritten with an environment variable by converting the
option to uppercase, replacing dashes with underscores and prefixing it with
`STF_TRIPROXY_` (e.g. `STF_TRIPROXY_BIND_PUB`).
Could not locate the bindings file. Tried:
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/Debug/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/Release/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/out/Debug/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/Debug/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/out/Release/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/Release/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/default/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/compiled/8.11.1/darwin/x64/zmq.node
Annak már utána jártam, hogy van egy debug cucc hozzá:
stf doctor
INF/cli:doctor 17141 [*] OS Arch: x64
INF/cli:doctor 17141 [*] OS Platform: darwin
INF/cli:doctor 17141 [*] OS Platform: 19.6.0
INF/cli:doctor 17141 [*] Using Node 8.11.1
ERR/cli:doctor 17141 [*] Unexpected error checking ZeroMQ: Error: Could not locate the bindings file. Tried:
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/Debug/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/Release/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/out/Debug/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/Debug/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/out/Release/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/Release/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/build/default/zmq.node
→ /usr/local/lib/node_modules/stf/node_modules/zmq/compiled/8.11.1/darwin/x64/zmq.node
INF/cli:doctor 17141 [*] Using GraphicsMagick 1.3.35
INF/cli:doctor 17141 [*] Using ProtoBuf 3.12.3
ERR/cli:doctor 17141 [*] ADB version cannot be detected
ERR/cli:doctor 17141 [*] RethinkDB version cannot be detected
Az utolsó 2 sor nagyon fura, mert
rethinkdb --version
rethinkdb 2.4.0 (CLANG 11.0.3 (clang-1103.0.32.62))
adb --version
Android Debug Bridge version 1.0.41
Version 30.0.0-6374843
Installed as /usr/local/bin/adb
Szerintem ennél a ZeroMQ-s üzenetnél: "Error: Could not locate the bindings file." lesz a kutya elásva. Gondolom valahol a Node-nál kell keresni a hiba forrását, de ennyire sajnos nem ismerem. Tudtok esetleg tippet adni, hogy mivel próbálkozzak, merre induljak tovább? Esetleg, ha valakinek van ezzel tapasztalata, és már végig szívta, akkor tudna hasznos tanácsot adni?