Mulet + gaia for OSX

I have followed this https://developer.mozilla.org/en-US/docs/Mozilla/B2G_OS/Developing_Gaia/Different_ways_to_run_Gaia#Using_Gaia_in_Firefox_Mulet until point 3. make mulet gave a error:

> Makefile:167: NO_FTU_PING=1
> # TODO: Get rid of references to gaia-node-modules stuff.
> install
> usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>                [-o owner] file1 file2
>        install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
>                [-o owner] file1 ... fileN directory
>        install -d [-v] [-g group] [-m mode] [-o owner] directory ...
> make: *** [node_modules] Error 64

so i whent further with the point 3.1 by downloading this file: http://ftp.mozilla.org/pub/b2g/nightly/latest-mozilla-central/firefox-49.0a1.en-US.mac64.dmg

then symlinking profile with a osx “alias”

and running by pointing towards the app i downloaded and the profile i symlinked but that always gave out the error in the “Note” of the tutorial im following liked at the top…
"A copy of Firefox is already open. Only one copy of Firefox can be open at a time."
But there is no other Firefox running…

I added sudo befor and then it opened firefox and a black screen apeared.
this is the last errorcode :

*** AUS:SVC UpdateService:onError - error during background update. error code: 1400, status text: Update XML file not found (404)

I remember @m.ducorps reported black screen as well.
And i read here about a problem i don’t understand: https://discourse.mozilla-community.org/t/mulet-gaia-for-linux/10375/2?u=novski

how can i fix that for OSX users?

That is not a good idea. There is no good reason to run Firefox as root …

That is probably a symptom of your profile. You should check if there’s a lock file inside. But the best way would be to fix the error you have above.

That seems very bad. What version of NPM do you have ? Can you give us the whole log ?

NPM?[quote=“lissyx, post:3, topic:10655”]
NPM
[/quote]

NONE!
i didn’t had node installed. And the Page you posted isn’t the page i looked to. Its a mess. This MDN realy makes me upset… Half of my issues cold be steped over in seconds if the documents wold be made tight and complet. I think i will have to rethink and come up with a solution that has a red line, soon…
anyway:

[fsevents] Success: “/Users/novski/Documents/Git/B2G/gaia/node_modules/npmr/node_modules/babel/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node” already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm ERR! Darwin 15.6.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” "install"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! sockit-to-me@1.0.2 install: CC=clang CXX=clang++ node-gyp configure build --verbose
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sockit-to-me@1.0.2 install script ‘CC=clang CXX=clang++ node-gyp configure build --verbose’.
npm ERR! This is most likely a problem with the sockit-to-me package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! CC=clang CXX=clang++ node-gyp configure build --verbose
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs sockit-to-me
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls sockit-to-me
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/novski/Documents/Git/B2G/gaia/npm-debug.log
make: *** [node_modules] Error 1
Novski:gaia novski$ npm version
{ gaia: ‘0.0.3’,
npm: ‘2.15.9’,
ares: ‘1.10.1-DEV’,
http_parser: ‘2.7.0’,
icu: ‘56.1’,
modules: ‘46’,
node: ‘4.5.0’,
openssl: ‘1.0.2h’,
uv: ‘1.9.1’,
v8: ‘4.5.103.37’,
zlib: ‘1.2.8’ }

does that say anything?
The file gaia/npm-debug.log does not exist…

Sadly node.js and osx is my limit :-/ it’s not something I can help at all.

<
https://ci5.googleusercontent.com/proxy/kY0yCMmDzLJk1E96ido5ikNAHe5zh52D3YphR1X2xsrOEU-akWaRVcb05gCxw4tWSLqENnwem5Tm-NtFWoV2NCt4Wc-JGW_Dh5C7jzgcntlxIgUGOQWTDe7tfUEQonn_B38KBuLWG02k6YjYTd1RxOikuyZQHm2_UG72p17U=s0-d-e1-ft#https://discourse.mozilla-community.org/user_avatar/discourse.mozilla-community.org/novski/45/4829_1.png>
Novski
September 2

NONE!
i didn’t had node installed. And the Page you posted isn’t the page i
looked to. Its a mess. This MDN realy makes me upset… Half of my issues
cold be steped over in seconds if the documents wold be made tight and
complet. I think i will have to rethink and come up with a solution that
has a red line, soon…
anyway:

[fsevents] Success:
"/Users/novski/Documents/Git/B2G/gaia/node_modules/npmr/node_modules/babel/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node"
already installed
Pass --update-binary to reinstall or --build-from-source to recompile
npm ERR! Darwin 15.6.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” "install"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! sockit-to-me@1.0.2 install: CC=clang CXX=clang++ node-gyp
configure build --verbose
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sockit-to-me@1.0.2 install script ‘CC=clang
CXX=clang++ node-gyp configure build --verbose’.
npm ERR! This is most likely a problem with the sockit-to-me package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! CC=clang CXX=clang++ node-gyp configure build --verbose
npm ERR! You can get information on how to open an issue for this project
with:
npm ERR! npm bugs sockit-to-me
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR!
npm ERR! npm owner ls sockit-to-me
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/novski/Documents/Git/B2G/gaia/npm-debug.log
make: *** [node_modules] Error 1
Novski:gaia novski$ npm version
{ gaia: ‘0.0.3’,
npm: ‘2.15.9’,
ares: ‘1.10.1-DEV’,
http_parser: ‘2.7.0’,
icu: ‘56.1’,
modules: ‘46’,
node: ‘4.5.0’,
openssl: ‘1.0.2h’,
uv: ‘1.9.1’,
v8: ‘4.5.103.37’,
zlib: ‘1.2.8’ }

does that say anything?
The file gaia/npm-debug.log does not exist…


Visit Topic or reply to this email to respond.


In Reply To

<
https://ci5.googleusercontent.com/proxy/awzTLeZSQ4NoIfBlGZA3lo26kZQVVC_BjmANCNdQ4J3ntLbC3OZJIeAQFM53I2NXMRdNwx5dc_wrzQauIPOWKNBxCWTk2WOuGwsP5-7iO_OBAvvokOOWFV5k6nWiczuxCcFLpgrVlO3SS2U=s0-d-e1-ft#https://discourse.mozilla-community.org/letter_avatar_proxy/v2/letter/l/ecb155/45.png>
lissyx

I was able to fix it. I had to login! :grinning:
npm whoami gives out the error and the helpful line: npm adduser
then i was able to successfuly build with make mulet
and now i still have the two problems that with sudo it opens firefox but its black.
Without sudo it echos a other version of firefox is already open…

Can you explane that?

What does that mean?

I also tried to downgrade my node to 4.4.7 as i use in my linux build vm. same

for history i did this by installing nvm with

brew install nvm

and adding the two lines in the description.
then i was able to install with

nvm install 4.4.7

and

nvm use 4.4.7

to activate it.

nvm ls

lists the installed versions and makes the active one with “–>”

I would really advise you to |make clean| in gaia and then |make profile|.

From there you should be able to firefox -no-remote -profile
path/to/gaia/profile

It is possible the profile you have has a lock file already.

<
https://ci5.googleusercontent.com/proxy/kY0yCMmDzLJk1E96ido5ikNAHe5zh52D3YphR1X2xsrOEU-akWaRVcb05gCxw4tWSLqENnwem5Tm-NtFWoV2NCt4Wc-JGW_Dh5C7jzgcntlxIgUGOQWTDe7tfUEQonn_B38KBuLWG02k6YjYTd1RxOikuyZQHm2_UG72p17U=s0-d-e1-ft#https://discourse.mozilla-community.org/user_avatar/discourse.mozilla-community.org/novski/45/4829_1.png>
Novski
September 2

I was able to fix it. I had to login! <
https://ci4.googleusercontent.com/proxy/J9NS1weuiQ1MQut1Y5wdjJL_-1GrcN-85aLmoy0oEQMRCo1SNMIED5u4Fb6kz-dRiKQcGbLjA0WKsKWV96QP1OTWiWxfNVbAOK7S5DGfbLYcNXkrNWyuzQSut4csX8d23tsHWa8=s0-d-e1-ft#https://discourse.mozilla-community.org/images/emoji/emoji_one/grinning.png?v=2

npm whoami gives out the error and the helpful line: npm adduser
then i was able to successfuly build with make mulet
and now i still have the two problems that with sudo it opens firefox but
its black.
Without sudo it echos a other version of firefox is already open…

Can you explane that?

<
https://ci3.googleusercontent.com/proxy/a6EMeT_h5MyWLSl50LcVcJUcuUEikIXcNOGXGJp-rrXv_7kQn0Wq-HQyymFXmI0doJHrcmzOsl7o4aRl636hcMyALwftzCNk9QPOpt9NxLIADNXTj0GcC0i1vgWFaHC0yIhNPOj5vscsw7s=s0-d-e1-ft#https://discourse.mozilla-community.org/letter_avatar_proxy/v2/letter/l/ecb155/40.png
lissyx:

You should check if there’s a lock file inside

What does that mean?

I also tried to downgrade my node to 4.4.7 as i use in my linux build vm.
same

for history i did this by installing nvm with

brew install nvm

and adding the two lines in the description.
then i was able to install with

nvm install 4.4.7

and

nvm use 4.4.7

to activate it.

nvm ls

lists the installed versions and makes the active one with “–>”


Visit Topic or reply to this email to respond.


In Reply To

<
https://ci5.googleusercontent.com/proxy/awzTLeZSQ4NoIfBlGZA3lo26kZQVVC_BjmANCNdQ4J3ntLbC3OZJIeAQFM53I2NXMRdNwx5dc_wrzQauIPOWKNBxCWTk2WOuGwsP5-7iO_OBAvvokOOWFV5k6nWiczuxCcFLpgrVlO3SS2U=s0-d-e1-ft#https://discourse.mozilla-community.org/letter_avatar_proxy/v2/letter/l/ecb155/45.png>
lissyx
September 2
That is not a good idea. There is no good reason to run Firefox as root
… That is probably a symptom of your profile. You should check if there’s
a lock file inside. But the best way would be to fix the error you have
above.

I did that and then started with:

Firefox/Contents/MacOS/firefox-bin -no-remote -profile /profile/ | tee mulet.log

but that gave this error:

*** UTM:SVC TimerManager:registerTimer - id: xpi-signature-verification
1472846017357 Marionette INFO Listening on port 2828
*** UTM:SVC TimerManager:registerTimer - id: browser-cleanup-thumbnails
*** AUS:SVC Creating UpdateService
*** AUS:SVC getCanApplyUpdates - testing write access /private/var/root/Library/Caches/Mozilla/updates/Users/novski/Documents/Git/B2G/FirefoxNightly49/update.test
*** AUS:SVC getCanApplyUpdates - testing write access /Users/novski/Documents/Git/B2G/FirefoxNightly49.app/Contents/MacOS/update.test
*** AUS:SVC getCanApplyUpdates - able to apply updates
*** AUS:SVC gCanStageUpdatesSession - testing write access /Users/novski/Documents/Git/B2G/FirefoxNightly49.app/update.test
*** AUS:SVC gCanStageUpdatesSession - able to stage updates
*** AUS:SVC Checker:getUpdateURL - update URL: https://aus5.mozilla.org/update/5/Firefox/49.0a1/20160429030246/%PRODUCT_DEVICE%/en-US/nightly/Darwin%2015.6.0/default/default/%IMEI%/update.xml
*** AUS:SVC gCanCheckForUpdates - able to check for updates
*** AUS:SVC Checker: checkForUpdates, force: false
*** AUS:SVC Checker:getUpdateURL - update URL: https://aus5.mozilla.org/update/5/Firefox/49.0a1/20160429030246/%PRODUCT_DEVICE%/en-US/nightly/Darwin%2015.6.0/default/default/%IMEI%/update.xml
*** AUS:SVC Checker:checkForUpdates - sending request to: https://aus5.mozilla.org/update/5/Firefox/49.0a1/20160429030246/%PRODUCT_DEVICE%/en-US/nightly/Darwin%2015.6.0/default/default/%IMEI%/update.xml
*** AUS:SVC Checker:onLoad - request completed downloading document
*** AUS:SVC Checker:_updates get - unexpected node name!
*** AUS:SVC Checker:onLoad - there was a problem checking for updates. Exception: Error: Unexpected node name, expected: updates, got: parsererror
*** AUS:SVC Checker:onLoad - request.status: 400
*** AUS:SVC getStatusTextFromCode - transfer error: Update XML file not found (404), default code: 404
*** AUS:SVC UpdateService:onError - error during background update. error code: 1400, status text: Update XML file not found (404)
1472846024552 AlarmsService DEBUG init()
1472846024553 AlarmsService DEBUG _restoreAlarmsFromDb()
–*-- KillSwitchMain: No proper libcutils binding, aborting.
1472846024671 AlarmsService DEBUG Callback after getting alarms from database: []
1472846024671 AlarmsService DEBUG Current alarm: null
1472846024671 AlarmsService DEBUG Alarm queue: []

Then during writing this post i noticed that the path may be wrong and tried like that:

Firefox/Contents/MacOS/firefox-bin -no-remote -profile profile/ | tee mulet.log

Did you notice there is no backslash bevor profile/
And that workded.

Thanks for your help @lissyx!

summary on how to install mulet for OSX

OSX El Capitan (10.11.6)

  1. Install Homebrew
  2. Install Node
  3. Install Node Version Manager
  4. Fetch the gaia code
  5. Make profile
  6. Make Mulet
  7. Execute Mulet

Install Homebrew

$ xcode-select --install
$ ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
$ brew update
Add this line to
export PATH="/usr/local/bin:$PATH"

Install Node

$ brew install node
$ node -v
$ npm -v

Install Node Version Manager

$ brew install nvm
$ nvm ls

If not in the list:

$ nvm install 4.4.7

Then use it:

$ nvm use 4.4.7

make working directory for nvm:

mkdir ~/.nvm’

open the file:

vim ~/.bash_profile

type “i” on the keyboard so in the left lower corner --Insert-- apears
and add this line:

export NVM_DIR="$HOME/.nvm”’ '. “$(brew --prefix nvm)/nvm.sh”

then press “esc” and “:wq” to escape insertion mode and write and quite at the same time.

now check if version is taken with:

nvm ls

if that prints a few lines and the top one looks like this:

-> v4.4.7
system
default -> 4.4.7 (-> v4.4.7)
node -> stable (-> v4.4.7) (default)
stable -> 4.4 (-> v4.4.7) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.5.0 (-> N/A)

then carry on…

##Fetch the Gaia code

$ cd Documents - or to the directory you wold like to locate the mulet
:gaia ‘user’$ git clone https://github.com/your-username/gaia.git && cd gaia
:gaia ‘user’$ git remote add upstream https://github.com/mozilla-b2g/gaia
:gaia ‘user’$ npm config set python python2
:gaia ‘user’$ make
##Make profile
:gaia ‘user’$ make profile
##Make Mulet
:gaia ‘user’$ make mulet
##Execute Mulet
:gaia ‘user’$ Firefox/Contents/MacOS/firefox-bin -no-remote -profile profile/

Looks like you have everything needed to update mdn :slight_smile:

<
https://ci5.googleusercontent.com/proxy/kY0yCMmDzLJk1E96ido5ikNAHe5zh52D3YphR1X2xsrOEU-akWaRVcb05gCxw4tWSLqENnwem5Tm-NtFWoV2NCt4Wc-JGW_Dh5C7jzgcntlxIgUGOQWTDe7tfUEQonn_B38KBuLWG02k6YjYTd1RxOikuyZQHm2_UG72p17U=s0-d-e1-ft#https://discourse.mozilla-community.org/user_avatar/discourse.mozilla-community.org/novski/45/4829_1.png>
Novski
September 3

summary on how to install mulet for OSX

OSX El Capitan (10.11.6)

Install Homebrew
Install Node
Install Node Version Manager
Fetch the gaia code
Make profile
Make Mulet
Execute Mulet

Install Homebrew

$ xcode-select --install
$ ruby -e “$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)”
$ brew update
Add this line to
export PATH="/usr/local/bin:$PATH"

Install Node

$ brew install node
$ node -v
$ npm -v

Install Node Version Manager

$ brew install nvm
$ nvm ls

If not in the list:

$ nvm install 4.4.7

Then use it:

$ nvm use 4.4.7

Fetch the Gaia code

$ cd Documents - or to the directory you wold like to locate the mulet
:gaia ‘user’$ git clone https://github.com/your-username/gaia.git && cd
gaia
:gaia ‘user’$ git remote add upstream https://github.com/mozilla-b2g/gaia
:gaia ‘user’$ npm config set python python2
:gaia ‘user’$ make

Make profile

:gaia ‘user’$ make profile

Make Mulet

:gaia ‘user’$ make mulet

Execute Mulet

:gaia ‘user’$ Firefox/Contents/MacOS/firefox-bin -no-remote -profile
profile/

Well if i dive in to that ugly topic i will not leave a brick on the other…
But yes i will. Someday.

Everything you called “errors” like:

are just debug logs, not errors.