I am trying to run my project to Xcode 13.1 but the problem is that build is failing with message:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening Ajman.xcworkspace. Run CLI with --verbose flag for more details.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace Ajman.xcworkspace -configuration Debug -scheme Ajman -destination id=6C41B609-DA05-4FAD-98F3-CC0264871189
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
note: Using new build system
note: Planning
Analyze workspace
Create build description
Build description signature: 1552deb311feffa24b258a2f780d63f1
Build description path: /Users/younisrahman/Library/Developer/Xcode/DerivedData/Ajman-gmdogtmpvnnzkcfzhirvzdbwaslh/Build/Intermediates.noindex/XCBuildData/1552deb311feffa24b258a2f780d63f1-desc.xcbuild
note: Build preparation complete
note: Building targets in parallel
CompileC /Users/younisrahman/Library/Developer/Xcode/DerivedData/Ajman-gmdogtmpvnnzkcfzhirvzdbwaslh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Volumes/Software/Projects/React-Native/Ajman/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
cd /Volumes/Software/Projects/React-Native/Ajman/ios/Pods
export LANG\=en_US.US-ASCII
.
.
.
.
.
The following build commands failed:
CompileC /Users/younisrahman/Library/Developer/Xcode/DerivedData/Ajman-gmdogtmpvnnzkcfzhirvzdbwaslh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/ReactCommon.build/Objects-normal/x86_64/RCTTurboModuleManager.o /Volumes/Software/Projects/React-Native/Ajman/node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'ReactCommon' from project 'Pods')
(1 failure)
# Add this code bottom in Podfile
post_install do |installer|
#Fix after updating to Xcode 13.1
find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
"_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
"RCTBridgeModuleNameForClass(module))", "RCTBridgeModuleNameForClass(Class(module)))")
end
def find_and_replace(dir, findstr, replacestr)
Dir[dir].each do |name|
text = File.read(name)
replace = text.gsub(findstr,replacestr)
if text != replace
puts "Fix: " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end
# If not work try this
change a parameter cast in the React module RCTTurboModuleManager.mm,
RCTBridgeModuleNameForClass(strongModule))
to
RCTBridgeModuleNameForClass(Class(strongModule)))
Related
Hi guys its my first time trying digital ocean,
I am deploying my app via Launch App and my code are hosted on github however when i try importing the code and building i am getting the below error and i have no idea what that is
Please help
2021-08-03T21:47:06.796342084Z => Initializing build
2021-08-03T21:47:06.832099453Z => Retrieving source code to /workspace
2021-08-03T21:47:06.860459803Z => Selecting branch "main"
2021-08-03T21:47:09.561399472Z => Checking out commit "9be192339cd0a8c93919eaf5959bd43c5ff06927"
2021-08-03T21:47:12.318858786Z => Got source_dir: /
2021-08-03T21:47:12.344366201Z => Using workspace root /workspace
2021-08-03T21:47:12.414846752Z
2021-08-03T21:47:12.414907116Z => Building app using buildpacks
2021-08-03T21:47:12.704652275Z => Injecting app environment variables:
2021-08-03T21:47:12.704707986Z QUEUE_CONNECTION DB_HOST SESSION_LIFETIME TWILIO_ACCOUNT_SID SENTRY_TRACES_SAMPLE_RATE APP_URL SENTRY_LARAVEL_DSN TWILIO_AUTH_TOKEN MAIL_MAILER TEXTTAWK_ENVIRONMENT DB_PASSWORD API_SECRET TWILIO_PHONE_NUMBER PERSONAL_CLIENT_ID MAIL_USERNAME MAIL_FROM_ADDRESS PERSONAl_CLIENT_SECRET MULTI_DB_ENABLED BROADCAST_DRIVER APP_ENV GOOGLE_CLIENT_ID EXPANDED_LOGGING ERROR_EMAIL MAIL_PASSWORD GOOGLE_CLIENT_SECRET APP_NAME TRUSTED_PROXIES MAIL_HOST DB_CONNECTION APP_DEBUG DB_USERNAME GOOGLE_REDIRECT_URI APP_KEY CACHE_DRIVER MAIL_ENCRYPTION SESSION_DRIVER INTERNAL_QUEUE_ENABLED MAIL_FROM_NAME DB_PORT DB_DATABASE MAIL_PORT TEXTTAWK_ORGANIZATION_ID
2021-08-03T21:47:12.736297358Z => Configuring custom build command to be run at the end of the build:
2021-08-03T21:47:12.761828497Z composer install
2021-08-03T21:47:13.365839056Z => Running buildpack detection
2021-08-03T21:47:13.365923629Z
2021-08-03T21:47:14.074627212Z heroku/nodejs-engine 0.5.0
2021-08-03T21:47:14.074682595Z digitalocean/node 0.3.4
2021-08-03T21:47:14.074757668Z digitalocean/php-appdetect 0.0.3
2021-08-03T21:47:14.074803894Z heroku/php 0.188.4
2021-08-03T21:47:14.075038595Z digitalocean/procfile 0.0.3
2021-08-03T21:47:14.075058351Z digitalocean/custom 0.1.0
2021-08-03T21:47:14.202672749Z
2021-08-03T21:47:14.202717224Z For documentation on the buildpacks used to build your app, please see:
2021-08-03T21:47:14.202743590Z Node.js: https://do.co/apps-buildpack-node
2021-08-03T21:47:14.202798824Z PHP: https://do.co/apps-buildpack-php
2021-08-03T21:47:14.818696983Z
2021-08-03T21:47:14.818882813Z => Building app
2021-08-03T21:47:14.818924263Z
2021-08-03T21:47:15.093655477Z ---> Node.js Buildpack
2021-08-03T21:47:15.108387965Z ---> Installing toolbox
2021-08-03T21:47:15.129668030Z ---> - jq
2021-08-03T21:47:15.847171368Z ---> - yj
2021-08-03T21:47:16.137897473Z ---> Getting Node version
2021-08-03T21:47:16.185826122Z ---> Resolving Node version
2021-08-03T21:47:18.820896954Z ---> Downloading and extracting Node v12.22.4
2021-08-03T21:47:33.310168979Z ---> Parsing package.json
2021-08-03T21:47:34.458500684Z ---> No file to start server
2021-08-03T21:47:34.458547440Z ---> either use 'docker run' to start container or add index.js or server.js
2021-08-03T21:47:34.543028305Z Error: package-lock.json does not exist. Please commit either a package-lock.json or yarn.lock file to your repository and try again.
2021-08-03T21:47:34.543513537Z project does not contain a package manager lockfile
2021-08-03T21:47:34.546474624Z [31;1mERROR: [0mfailed to build: exit status 1
2021-08-03T21:47:37.973947707Z
2021-08-03T21:47:37.974088341Z For documentation on the buildpacks used to build your app, please see:
2021-08-03T21:47:37.974111872Z Node.js: https://do.co/apps-buildpack-node
2021-08-03T21:47:37.974199168Z PHP: https://do.co/apps-buildpack-php
2021-08-03T21:47:37.977558349Z
2021-08-03T21:47:37.977966439Z [31m ! Build failed (145)[0m
For anyone who might face this same challenge in the future,
for me the problem was "package.json"
if you deploying a Laravel API you need to delete the package.json file from your project. For me that was the issue that was preventing my project from building
Happy coding
I had a similar error and fixed it a different way. Since the error said "package-lock.json does not exist.", I added a package-lock.json file by running the npm install command in the root directory of the app, the one with the package.json file. After that the app deployed successfully.
I am using Testcafe (free version) with Java Script. I want to run all my test cases (resides in multiple test scripts in __test__ directory) in a single browser instance (That way 1 time log in) per browser type.
For example, 1 instance for chrome and 1 instance for safari but all tests will run before closing the browser.
If a test fails, I want the screenshot is taken and count number of the test failures. But do want to continue.
I'm doing all on Node 12 Docker image, so it is best if I don't need to install anything else.
How do I do this with Testcafe?
const createTestCafe = require('testcafe')
let testcafe = null
let runner = null
createTestCafe('localhost', 1337, 1338)
.then(tc => {
testcafe = tc
const runner = testcafe.createRunner()
return runner
.src([ '__test__/*.js' ])
.browsers([ 'chrome:headless --no-sandbox --disable-gpu', 'safari' ])
.screenshots('./reports/screenshots/', true)
.run({
selectorTimeout: 10000,
assertionTimeout: 10000,
})
})
runner
.screenshots({
path: 'reports/screenshots/',
takeOnFails: true,
})
.then(failedCount => {
console.log('Tests failed: ' + failedCount)
testcafe.close()
})
.catch(error => {
console.log("An ERROR detected:" + error)
})
This is how you install chrome on Dockerfile. Can someone tell me how to install Firefox on Dockerfile?
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
http_proxy=${http_proxy} https_proxy=${https_proxy} apt-get update && \
http_proxy=${http_proxy} https_proxy=${https_proxy} apt-get install -y --allow-unauthenticated google-chrome-stable && \
apt clean && rm -rf /var/lib/apt/lists/*
It's impossible to meet all requirements at once.
1) For example, 1 instance for chrome and 1 instance for safari but all tests will run before closing the browser.
You cannot install the Chrome and Safari web browsers on docker image. It's possible to install only Chromium and Firefox on it. See the Using TestCafe docker help topic for more information.
2) If a test fail, I want the screen shot taken and count number of test failed. But do want to continue.
TestCafe's Live mode works in the same way, but it's not available on docker.
This case you need to use Session Handling
During test execution, the Selenium WebDriver has to interact with the browser all the time to execute given commands. At the time of execution, it is also possible that, before current execution completes, someone else starts execution of another script, in the same machine and in the same type of browser.
more details
I'm trying to install Node.js on Centos 5.5, which the latest update has removed yum.
So when i'm trying to run make I get the following error. Any ideas why, or what is going on?
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/usr/local/src/node-v0.12.0/out'
LD_LIBRARY_PATH=/usr/local/src/node-v0.12.0/out/Release/lib.host:/usr/local/src/node-v0.12.0/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /usr/local/src/node-v0.12.0/out/Release/obj/gen; python ../../tools/js2c.py "/usr/local/src/node-v0.12.0/out/Release/obj/gen/libraries.cc" CORE off ../../src/runtime.js ../../src/v8natives.js ../../src/symbol.js ../../src/array.js ../../src/string.js ../../src/uri.js ../../third_party/fdlibm/fdlibm.js ../../src/math.js ../../src/messages.js ../../src/apinatives.js ../../src/debug-debugger.js ../../src/mirror-debugger.js ../../src/liveedit-debugger.js ../../src/date.js ../../src/json.js ../../src/regexp.js ../../src/arraybuffer.js ../../src/typedarray.js ../../src/weak_collection.js ../../src/promise.js ../../src/object-observe.js ../../src/collection.js ../../src/collection-iterator.js ../../src/macros.py ../../src/array-iterator.js ../../src/string-iterator.js
File "../../tools/js2c.py", line 409
except Error as e:
^
SyntaxError: invalid syntax
make[1]: *** [/usr/local/src/node-v0.12.0/out/Release/obj/gen/libraries.cc] Error 1
make[1]: Leaving directory `/usr/local/src/node-v0.12.0/out'
make: *** [node] Error 2
I'm encountering the same issue on RHEL5. I found a work-around until this gets fixed upstream. Edit deps/v8/tools/gyp/v8.gyp and replace 'python' with 'python2.7' to force that stage of the compile to use the correct version of python.
I filed an upstream bug at https://github.com/joyent/node/issues/9217
I try to install node-v0.10.26-x64.msi and cordova(PhoneGap) 3.4.0 for Windows 8. But it occurs an error on Windows 8.1(x64).
This is a result on Windows 8.1 command prompt(as an Administrator) for building:
C:\Windows\system32>npm install -g cordova
C:\Windows\system32>cd c:\data
c:\Data>cordova create abc com.aaa.bbb ccc
c:\Data>cd abc
c:\Data\abc>cordova platform add windows8
Project created
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: ]
c:\Data\abc>cordova build
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: ]
Running command: cmd args=["/c","c:\\Data\\abc\\platforms\\windows8\\cordova\\bu
ild"]
cordova library for "windows8" already exists. No need to download. Continuing.
Generating config.xml from defaults for platform "windows8"
Calling plugman.prepare for platform "windows8"
Preparing windows8 project
Procesabcg configuration changes for plugins.
creating jsproj from project at : C:\Data\abc\platforms\windows8\CordovaApp.jspr
oj
Iterating over installed plugins: []
Writing out cordova_plugins.js...
[Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: �]
Running command: cmd args=["/c","C:\\Data\\abc\\platforms\\windows8\\cordova\\bu
ild"]
c:\Data\abc\platforms\windows8\cordova\lib\build.js(57, 5) WshShell.Exec: file not found
Non-whitespace issue was solved by adding "contents = contents.substring(contents.indexOf("<"));" to "contents = fs.readFileSync(filename, 'utf-8')" into "node_modules\cordova..\xml-helpers.js".
But "build.js(57, 5) WshShell.Exec" error is not resolve.
Ungit looks the perfect tool to learn how git works, as it gives a graphical interface to understand what is going on. I want to share this video explanation (very useful to understand how git works even if you are not planning to use ungit).
It has synchronized my local repository perfectly. Unfortunately, when I have typed the bickbucket git url, it has produced the following error:
Ungit tried to run a git command that resulted in an unhandled error. An automatic bug report was sent.
Command (I didn't type it myself, ungit sent it automatically after typing the URL
git -c color.ui=false -c core.quotepath=false -c core.pager=cat -c credential.helper="C:/Documents and Settings/ch/Datos de programa/npm/node_modules/ungit/bin/credentials-helper 0" ls-remote --tags prototype-towunderlist2
Error. The error is probably because there are spaces in C:/Documents and Settings:
Error: Command failed: C:/Documents and Settings/ch/Datos de programa/npm/node_modules/ungit/bin/credentials-helper 0 get: C:/Documents: No such file or directory
fatal: could not read Password for 'https://chelder86#bitbucket.org': No such file or directory
It looks a Windows issue for me, so I have published it in stackoverflow instead the ungit bug report system.
UPDATE 1. I have found out how to get by, but I got another error:
fatal: Authentication failed for 'https://chelder86#bitbucket.org/chelder86/prototype-towunderlist2.git/'
To get by, I did the following. I opened a new cmd (command line). I went into the repository directory. I typed the same command but adding single quotes into the double quotes as follows:
Instead:
"C:/Documents and Settings/ch/Datos de programa/npm/node_modules/ungit/bin/credentials-helper 0"
I typed:
"C:/'Documents and Settings'/ch/'Datos de programa'/npm/node_modules/ungit/bin/credentials-helper 0"
Then, a form appeared in the browser to wrote my username and password. I wrote them, and the new error appeared in the command line (not in the user interface of the browser).
Screenshot:
UPDATE 2: the line where is generated the path "C:/Documents and Settings/ch/Datos de programa/npm/node_modules/ungit/bin/credentials-helper 0" is located in C:\Documents and Settings\ch\Datos de programa\npm\node_modules\ungit\source\git-api.js. It is:
function credentialsOption(socketId) {
var credentialsHelperPath = path.resolve(__dirname, '..', 'bin', 'credentials-helper').replace(/\\/g, '/');
return '-c credential.helper="' + credentialsHelperPath + ' ' + socketId + '" ';
}
I'm not a Javascript expert, so I need some time to find out how to build the correct path...
UPDATE 3: the temporal fix of the code of UPDATE 2 is the following:
[It is a fix, so I wrote it as an answer instead]
The temporal fix of the code of UPDATE 2 is the following:
function credentialsOption(socketId) {
var credentialsHelperPath = path.resolve(__dirname, '..', 'bin', 'credentials-helper').replace(/\\/g, '/');
var botchedFix1 = '-c credential.helper="' + credentialsHelperPath + ' ' + socketId + '" ';
var botchedFix2 = botchedFix1.replace("Documents and Settings","'Documents and Settings'");
botchedFix2 = botchedFix2.replace("Datos de programa","'Datos de programa'");
return botchedFix2;
}
Then, if I click on Fetch Nodes from prototype-towunderlist2 in the user interface of the internet browser (Firefox), I can enter my username and password. Unfortutately, I got a new error:
Command
git -c color.ui=false -c core.quotepath=false -c core.pager=cat -c credential.helper="C:/'Documents and Settings'/ch/'Datos de programa'/npm/node_modules/ungit/bin/credentials-helper 0" ls-remote --tags prototype-towunderlist2
Error
Error: Command failed: fatal: Authentication failed for 'https://chelder86#bitbucket.org/chelder86/prototype-towunderlist2.git/'
However, if you copy and paste the same command in a new cmd (command line), it seems working perfectly. Push is also working.
Feel free to improve my ugly solution!