First time using Nativescript, ran a simple script that uses nativescript-contacts for iOS (https://www.npmjs.com/package/nativescript-contacts) and giving me the following error:
2019-05-21 19:20:32.059 nsplaydev[284:10490] PlayLiveSync: Initializing NativeScript runtime at /var/mobile/Containers/Data/Application/F19FB79E-A435-49E6-A978-308E1C976F0A/Documents/Playground/LiveSync
CONSOLE WARN file:///app/c210e62cd8f442b19651.worker.js:31673:12: Objective-C class name "UIDocumentInteractionControllerDelegateImpl" is already in use - using "UIDocumentInteractionControllerDelegateImpl2" instead.
2019-05-21 19:20:32.108 nsplaydev[284:10454] PlayLiveSync: Uncaught Exception
2019-05-21 19:20:32.109 nsplaydev[284:10454] PlayLiveSync: Sending crash report
2019-05-21 19:20:32.132 nsplaydev[284:10439] PlayLiveSync: Successfully sent uncaught error message onZN396nE
2019-05-21 19:20:32.133 nsplaydev[284:10439] PlayLiveSync: Successfully sent log message onZN396nE
How/where do I see the error log? what is that unique identifier (onZN396nE) that it generates?
Thanks!
M
As per my understanding,You can not run the program on Playground that has dependencies on native APIs as playground has some limitations. However, it contains some of the most useful NativeScript plugins, and as such, covers a wide range of tasks you need to perform while developing apps.
nativescript-contacts plugin requires permissions and interacting with an part of the platform API is not very straight froward.
What do you know? I found the problem:
Part (a) code given below. The templateUrl is wrong below. It should be "login/login.component.hmtl"
import { Component } from "#angular/core";
#Component({
selector: "gr-login",
moduleId: module.id,
templateUrl: "./login.component.html"
})
export class AppComponent {}
Related
I am trying to automate file uploading via cypress but getting the error below.
I am not finding the root cause of the issue.
enter code here
The following error originated from your application code, not from Cypress.
Script error.
Cypress detected that an uncaught error was thrown from a cross origin script.
We cannot provide you the stack trace, line number, or file where this error occurred.
Check your Developer Tools Console for the actual error - it should be printed there.
It's possible to enable debugging these scripts by adding the crossorigin attribute and
setting a CORS header.
When Cypress detects uncaught errors originating from your application it will automatically
fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the
uncaught:exception event
Below is my code
it('Single File Upload-DOM', () => {
cy.visit('http://127.0.0.1:5500/Help%20Folder/fileupload.html')
cy.get('#file-upload1').attachFile('dog_small.jpg')
cy.get('span#fileName1').should('have.text','dog_small.jpg')
});
You can turn off the exception check globally by writing:
Cypress.on('uncaught:exception', (err, runnable) => {
return false
})
under cypress/support/index.js
I've just upgraded all my react native app packages and now I'm getting this error when running the app in Xcode:
INFO : BSG_KSCrashReport.c (1513): void bsg_kscrashreport_writeStandardReport(BSG_KSCrash_Context *const, const char *const): Writing crash report to /Users/Library/Developer/CoreSimulator/Devices/123/data/Containers/Data/Application/123/Library/Caches/KSCrashReports/foo/foo-123.json
2021-06-23 15:18:32.196550+1000 foo[12206:1933872] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Error: Minified Redux error #12; visit https://redux.js.org/Errors?code=12 for the full message or use the non-minified dev environment for full errors. ', reason: 'Unhandled JS Exception: Error: Minified Redux error #12; visit https://redux.js.org/Errors?code=12 for the full message or use the non-minified dev environment for full errors..., stack:
Redux error 12 state:
The slice reducer for key "" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.
I'm using rematch. If I look at all my generateModel functions they all provide a valid initialState.
Where can I start looking to debug this?
I'm a Rematch maintainer, if you want to provide a valid reproduction repo inside Rematch repo or here we'll be happy to help.
Rematch changed a lot internally from v1 to v2, not too much for end users, but probably there's something that you need to fit to make it runnning fine again :)
I'm trying to use the React and JavaScript SDKs for Optimizely, but getting the following error in the console:
OPTIMIZELY: Optimizely object is not valid. Failing isFeatureEnabled.
More info about my setup below:
Installed via Yarn: yarn add #optimizely/react-sdk
Import statement in the app container:
import {
createInstance
} from '#optimizely/react-sdk'
Logic in render function:
const optimizely = createInstance({
sdkKey: '<SDK_KEY>',
})
const enabled = optimizely.isFeatureEnabled('example_feature', 'user123');
I get this error in the Chrome console:
OPTIMIZELY: Optimizely object is not valid. Failing isFeatureEnabled.
The Optimizely object will log that error when you call isFeatureEnabled before the SDK has successfully loaded your project's datafile. This can happen for a number of reasons outlined below. Looking at the code example provided in the question, it looks like reason #4 is the most likely cause of the error, but here are all of them:
1. Bad SDK key
If you pass in a bad SDK Key to createInstance, the SDK will not successfully load the datafile and you will get this error.
const optimizely = createInstance({
sdkKey: 'invalid-sdk-key'
})
2. Malformed datafile
If you are passing in the datafile directly to createInstance, but pass in an object that isn't the proper datafile format, you will get this error:
const optimizely = createInstance({
datafile: { wrong: 'format' }
})
3. Inaccessible datafile
Make sure you can access the url of your datafile in a web browser: https://cdn.optimizely.com/datafiles/<Your_SDK_Key>.json. If you get an AccessDenied (403) or Not Found (404) error and your account is new, make sure you create something in the Optimizely UI so that Optimizely is triggered to create and upload a proper datafile.
If in the console of your running application you see a 403 or 404 for the request to the datafile, ensure there are no ad-blockers, firewalls, or proxies preventing the SDK from requesting the datafile on Optimizely's CDN from the SDK.
4. Not waiting for Optimizely SDK to be ready
Even if you have the right SDK Key and the SDK can access Optimizely's CDN. If you don't give the SDK enough time for the datafile request to finish, you will be trying to use the SDK before it's ready.
In the JavaScript SDK, this can be solved by using the onReady method:
const optimizely = createInstance({
sdkKey: 'valid-sdk-key',
});
optimizely.onReady().then(() => {
// optimizely is ready to use, with datafile downloaded from the Optimizely CDN
});
If using the <OptimizelyFeature> component of the React SDK, then the <OptimizelyFeature> component will automatically wait until the <OptimizelyProvider> has successfully loaded the datafile before evaluating isFeatureEnabled.
My Firefox console error was
[OPTIMIZELY] - ERROR <timestamp> OPTIMIZELY: Optimizely object is not valid. Failing isFeatureEnabled.
One of my network failures gave me a big clue. The GET request for cdn.optimizely.com showed "Blocked by AdBlocker Ultimate" under the Transferred column.
Solution
I turned off my ad blocker for this site.
So I've tried to follow this
http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/
And then this https://facebook.github.io/react-native/docs/linking-libraries-ios.html
Firebase SDK seems to be loaded, XCode says:
2017-06-18 19:35:49.969 myapp[2224]
[Firebase/Analytics][I-ACS005000] The AdSupport Framework is not
currently linked. Some features will not function properly. Learn more
at (stackoverflow forbids shorteners)
2017-06-18 19:35:49.971 myapp[2224]
[Firebase/Analytics][I-ACS023007] Firebase Analytics v.4001000 started
Then I'm getting a "Native module cannot be null" red screen after React Native loads.
XCode says:
2017-06-18 19:48:39.975 [info][tid:main][RCTCxxBridge.mm:184]
Initializing (parent: , executor: (null))
2017-06-18 19:48:39.980 [warn][tid:main][RCTBridge.m:114] Class
RCTCxxModule was not exported. Did you forget to use
RCT_EXPORT_MODULE()?
2017-06-18 19:48:39.994 [info][tid:main][RCTRootView.m:302] Running
application myapp ({
initialProps = {
};
rootTag = 1; })
2017-06-18 19:48:40.305 [error][tid:com.facebook.React.JavaScript]
Native module cannot be null.
Did anyone have better luck than me?
I'am trying to get youtube video's comments from my dart console application. I create application in google console.
Then I try to get video list:
import "package:googleapis/youtube/v3.dart" as youtube;
import "package:http/http.dart" as http;
void main() {
http.Client client = new http.Client();
youtube.YoutubeApi api = new youtube.YoutubeApi(client);
api.videos.list("title", id: "ZkGSR0Q492g").then((youtube.VideoListResponse list) {
// print("List length: " + list.items.length);
});
}
When I run this file in console - I get error:
Uncaught Error: DetailedApiRequestError(status: 403, message: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.)
I understand that I never indicated API-key applications. I think that the error due to this.
But I can not figure out where I need to specify it?
I guess you need to create an authenticated client using https://pub.dartlang.org/packages/google_oauth2_client (detailed instructions in the README.md)
Now I use package "googleapis_oauth". And in this package we have method clientViaApiKey in auth_io.dart. This is solve my problem.