React Native: Undefined symbol: _swift_stdlib_isStackAllocationSafe in Xcode - javascript

I am getting an error after updating Xcode to 13.3.1 in react native. Before upgrading Xcode app was working fine. Also, I haven't changed anything in code. But still I am getting error. I don't why after updating I am getting this error.
Error: Undefined symbol: _swift_stdlib_isStackAllocationSafe
Undefined symbols for architecture arm64:
"_swift_stdlib_isStackAllocationSafe", referenced from:
function signature specialization <Arg[1] = Owned To Guaranteed> of generic specialization <Swift.String, Swift._NativeSet<Swift.String>> of Swift._NativeSet.genericIntersection<A where A == A1.Element, A1: Swift.Sequence>(A1) -> Swift._NativeSet<A> in libLaunchDarkly.a(FlagChangeNotifier.o)
function signature specialization <Arg[1] = Owned To Guaranteed> of generic specialization <Swift.String> of Swift._NativeSet.intersection(Swift._NativeSet<A>) -> Swift._NativeSet<A> in libLaunchDarkly.a(FlagChangeNotifier.o)
function signature specialization <Arg[1] = Owned To Guaranteed, Arg[2] = Owned To Guaranteed> of function signature specialization <Arg[0] = [Closure Propagated : generic specialization <LaunchDarkly.FeatureFlag> of closure #1 (Swift.String) -> Swift.Bool in (extension in LaunchDarkly):Swift.Dictionary< where A == Swift.String>.symmetricDifference(Swift.Dictionary<Swift.String, Any>) -> Swift.Array<Swift.String>, Argument Types : [[Swift.String : LaunchDarkly.FeatureFlag][Swift.String : Any]]> of generic specialization <Swift.String> of Swift._NativeSet.filter((A) throws -> Swift.Bool) throws -> Swift._NativeSet<A> in libLaunchDarkly.a(FlagChangeNotifier.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
react-native": "0.64.2"
Why I am getting this error? And, how can I solve this error?

Have you yet figured this one out? I suspect the Launch Darkly RN SDK is way out of date, as they're still using the older state management form.

Related

Expo npm run ios fails after adding slug

I have an app made with react-native expo, and i wanted to try and build it so i can set up firebase.
According to expo instructions, i created a project on expo.dev with the same name and added "owner" and "slug" to my app.json file. However, when trying to run "npm run ios" after adding the slug i get this error, which i have no idea what means.
ossible Unhandled Promise Rejection (id: 0):
Error: Directory for 'file:///Users/julz/Library/Developer/CoreSimulator/Devices/22E46E5F-3F35-495D-8E02-C3DDED361E02/data/Containers/Data/Application/7924CAA0-6983-4208-BBD1-EB9F6A2746C9/Library/Caches/ExponentExperienceData/%2540jujasen%252Ftrachi/ExponentAsset-b3263095df30cb7db78c613e73f9499a.ttf' doesn't exist. Please make sure directory '/Users/julz/Library/Developer/CoreSimulator/Devices/22E46E5F-3F35-495D-8E02-C3DDED361E02/data/Containers/Data/Application/7924CAA0-6983-4208-BBD1-EB9F6A2746C9/Library/Caches/ExponentExperienceData/%40jujasen%2Ftrachi' exists before calling downloadAsync.
promiseMethodWrapper#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:20580:45
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:98019:46
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:101458:61
generatorResume#[native code]
asyncGeneratorStep#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:21901:26
_next#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:21920:29
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:21925:14
tryCallTwo#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:26684:9
doResolve#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:26816:25
Promise#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:26703:14
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:21917:25
_downloadAsync#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:101462:32
downloadAsync#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:101450:32
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:100951:67
generatorResume#[native code]
asyncGeneratorStep#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:21901:26
_next#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:21920:29
tryCallOne#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:26676:16
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:26757:27
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:27715:26
_callTimer#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:27630:17
_callReactNativeMicrotasksPass#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:27663:17
callReactNativeMicrotasks#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:27827:44
__callReactNativeMicrotasks#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:20999:46
#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:20799:45
__guard#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:20979:15
flushedQueue#http://192.168.0.107:19000/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false:20798:21
flushedQueue#[native code]
invokeCallbackAndReturnFlushedQueue#[native code]
The slug for my app used to be "Trachi", but since the slug in expo.dev is "trachi" with lowercase i had to change it to that. If i put the old slug with the uppercase T back, the app works without errors again. Does anyone have any idea how i can solve this?

Invalid configuration object: webpack-cli configuration.optimization.splitChunks Webpacker 5 Rails 6

After upgrading from Webpacker 4 to 5, I receive a new error while running rails webpacker:compile. Running yarn dev, alone; works without issue -- I can't seem to find what the cause of this bug is, or what file its located in. There's aren't many debugging tools in this case. How do I fix the problem where splitChunks is failing for webpacker 5?
Error:
➜ rails webpacker:compile
warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.4.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
I, [2022-01-04T14:59:51.4223 #20612] INFO -- : initializing Lit
Compiling...
Compilation failed:
[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.optimization.splitChunks should be one of these:
false | object { automaticNameDelimiter?, cacheGroups?, chunks?, defaultSizeTypes?, enforceSizeThreshold?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, usedExports? }
-> Optimize duplication and caching by splitting chunks by shared modules and cache group.
Details:
* configuration.optimization.splitChunks.name should be one of these:
false | string | function
-> Give chunks created a name (chunks with equal name are merged).
Details:
* configuration.optimization.splitChunks.name should be false.
* configuration.optimization.splitChunks.name should be a string.
* configuration.optimization.splitChunks.name should be an instance of function.
I don't what's your configurations, but the problem is in your configuration.optimization.splitChunks.name being something other then either false , string or instance of function

Using the Datadog logs and RUM SDKs sends multiple requests when errors are being thrown

I have the following issue:
Trigger
An uncaught exception is being thrown and datadog logs SDK sends request to log the incident.
Expected outcome
One request is sent/incident and the incident is logged only once in Datadog UI.
Actual outcome
Datadog logs SDK sends many requests/incident (between 1k-2.5k) and the incident is logged many times in Datadog UI.
Additional Information
When disabling the Datadog RUM SDK, then the Datadog logs SDK behaves as expected. However, I want to run them both, so this is not an option at the moment.
I am using version 3.1.3 for both #datadog/browser-logs and #datadog/browser-rum packages.
Here's a screenshot to illustrate the issue:
Many requests being sent for one uncaught exception example
This is the code I am using to initialise both logs and RUM SDKs:
import { datadogLogs } from '#datadog/browser-logs';
import { datadogRum } from '#datadog/browser-rum';
if (process.env.NODE_ENV === 'production' && process.env.DATADOG_CLIENT_TOKEN) {
const environment = getEnvironment();
const config = {
site: 'datadoghq.eu',
clientToken: process.env.DATADOG_CLIENT_TOKEN,
service: typeof DATADOG_SERVICE !== 'undefined' ? DATADOG_SERVICE : undefined,
env: environment ? `${environment}` : undefined,
proxyHost: process.env.PROXY_HOST
};
datadogLogs.init(config);
if (process.env.DATADOG_APPLICATION_ID) {
datadogRum.init({
...config,
trackInteractions: true,
applicationId: process.env.DATADOG_APPLICATION_ID
});
datadogRum.setUser({
name: service.getName(),
email: service.getEmail()
});
}
}
I had the same issue, Upgrading both Datadog Rum and logging to 3.6.13 fixed this for me:
"#datadog/browser-logs": "^3.6.13",
"#datadog/browser-rum": "^3.6.13",
For anyone else:
Use localhost, not custom domain names. For some reason, DD_RUM.getInternalContext() didn't work for custom domain names.
Install versions of both RUM and logs - latest and possibly the same version. Incase you want specific varying versions, check the dependency packages for the datadog packages on the package.lock. It can be different which can throw errors.

"ReferenceError: StackTrace is not defined" in Vue app with "stackdriver-errors-js"

I am trying to integrate the stackdriver-error-js library into my Vue project as a module.
The code and the setup:
in package.json
"stackdriver-errors-js": "^0.2.0"
in bootstrap.js
import errorHandler from './error/error-reporting';
in error-reporting.js
import { StackdriverErrorReporter } from 'stackdriver-errors-js';
let errorHandler;
errorHandler = new StackdriverErrorReporter();
errorHandler.start({
key: "{{.Config.StackDriverApiKey}}",
projectId: "{{.Config.StackDriverProject}}",
service: "{{.Config.GoogleCloudProjectID}}",
version: "{{.Copacknfig.GaeEnv}}",
disabled: false
});
export default errorHandler;
The actual error
The error I got now is (console output and test)
[vue-devtools] Ready. Detected Vue v2.4.2
(function testErrorReporting() {window.onerror(null, null, null, null, new Error('Test: Something broke!'));})();
stackdriver-errors.js:109 Uncaught ReferenceError: StackTrace is not defined
at StackdriverErrorReporter.webpackJsonp.556.StackdriverErrorReporter.report (stackdriver-errors.js:109)
at window.onerror (stackdriver-errors.js:67)
at testErrorReporting (<anonymous>:1:40)
at <anonymous>:1:111
and line (stackdriver-errors.js:109)
...
StackTrace.fromError(err).then(function(stack){
...
If you do not load the stackdriver-errors-concat.min.js file, you also manually need to also the stacktrace-js module.
stackdriver-errors expects a StackTrace object to be present.
Since the library you want to use is experimental, and therefore cannot be used in a production environment, it would be better to use a different library which has been tested and validated for production use.
I suggest using this other library instead, which includes features related to Stackdriver error reporting for Node.js and JavaScript.
First of all, install the dependency by running this command:
npm install --save #google-cloud/error-reporting
This will add the dependency automatically to package.json.
In error-reporting.js, you can add the dependencyby adding this to your code (All the parameters are optional):
var errors = require('#google-cloud/error-reporting')({
projectId: 'my-project-id',
keyFilename: '/path/to/keyfile.json',
credentials: require('./path/to/keyfile.json'),
// if true library will attempt to report errors to the service regardless
// of the value of NODE_ENV
// defaults to false
ignoreEnvironmentCheck: false,
// determines the logging level internal to the library; levels range 0-5
// where 0 indicates no logs should be reported and 5 indicates all logs
// should be reported
// defaults to 2 (warnings)
logLevel: 2,
// determines whether or not unhandled rejections are reported to the
// error-reporting console
reportUnhandledRejections: true,
serviceContext: {
service: 'my-service',
version: 'my-service-version'
}
});
After that, use this code to test if the error is properly reported by Stackdriver:
errors.report(new Error('Something broke!'));
Please be aware that this library is currently on a beta stage, so there might be some changes to it in the future.

Compile a Polymer app in Dart

I am using Dart 0.8.10_r30104 (DEV) and find it unable to generate the Javascript (the app itself can run in Dartrium, though).
Errors prompted when I choose to "Generate Javascript" on builder.dart:
--- Nov 12, 2013 7:35:43 AM Running dart2js... ---
F:\dart\dart-sdk\bin\dart2js.bat --out=E:\My Books\Sitepoint\Sample\build.dart.js E:\My Books\Sitepoint\Sample\build.dart
/E:/My Books/Sitepoint/Sample/packages/polymer/builder.dart:83:8: Error: Library not found 'dart:io'.
import 'dart:io';
^^^^^^^^^
/E:/My Books/Sitepoint/Sample/packages/polymer/src/build/linter.dart:11:8: Error: Library not found 'dart:io'.
import 'dart:io';
^^^^^^^^^
/E:/My Books/Sitepoint/Sample/packages/barback/src/asset.dart:9:8: Error: Library not found 'dart:io'.
import 'dart:io';
^^^^^^^^^
...
/E:/My Books/Sitepoint/Sample/packages/analyzer/src/generated/element.dart:7220:17: Hint: The class 'VoidTypeImpl' overrides 'operator==', but not 'get hashCode'.
bool operator ==(Object object) => identical(object, this);
^^
/E:/My Books/Sitepoint/Sample/packages/analyzer/src/generated/element.dart:4874:17: Hint: The class 'PropertyAccessorElementImpl' overrides 'operator==', but not 'get hashCode'.
bool operator ==(Object object) => super == object && identical(isGetter, ((object as PropertyAccessorElement)).isGetter);
^^
Error: Compilation failed.
===
What went wrong?
To generate JS for a polymer app, you need to run "pub build" at the top level of your application. This will create a top level directory called build, which will include your JS (and html that points at the JS).

Categories