tidev / ioslib

IOS Utilities Library
Other
68 stars 37 forks source link

Callback was already called #245

Open cb1kenobi opened 1 month ago

cb1kenobi commented 1 month ago

When checking if the Xcode EULA has been accepted (via xcodebuild), it triggers Xcode to check for CLI tools or iOS components to be installed. This will pop up an OS auth window and can do it multiple times.

Some how the callback is getting fired multiple times here: https://github.com/tidev/ioslib/blob/1_7_X/lib/xcode.js#L698-L701.

/Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/async/dist/async.js:326
            if (fn === null) throw new Error("Callback was already called.");
                             ^

Error: Callback was already called.
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/async/dist/async.js:326:36
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/async/dist/async.js:3681:17
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/ioslib/lib/xcode.js:619:16
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/ioslib/lib/simctl.js:304:12
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/async/dist/async.js:329:20
    at next (/Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/async/dist/async.js:5665:29)
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/ioslib/lib/simctl.js:278:13
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/async/dist/async.js:329:20
    at next (/Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/async/dist/async.js:5665:29)
    at /Users/x/Library/Application Support/Titanium/mobilesdk/osx/12.4.0.GA/node_modules/ioslib/lib/simctl.js:706:6

As a workaround, users can run xcode-select --install.