firebase-analytics
firebase-analytics copied to clipboard
setScreenName:screenClass: must be called from the main thread to ensure that events are associated with the intended screen.
Describe the bug I have tried to set screen name using setScreenName in Angular 8, but it returns "setScreenName:screenClass: must be called from the main thread to ensure that events are associated with the intended screen."
Expected behavior I expected setScreenName method change screen name, so Firebase Analytics tracks the name I set.
Screenshots
Xcode console
Angular 8 source code
and package.json
{
"name": "shaashop-1.1-ionic",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~8.1.2",
"@angular/common": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/forms": "~8.1.2",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@capacitor-community/firebase-analytics": "^0.1.3",
"@capacitor/android": "^2.1.0",
"@capacitor/core": "^2.1.0",
"@capacitor/ios": "^2.1.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.7.1",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^5.0.0",
"cordova-support-android-plugin": "^1.0.2",
"cordova-support-google-services": "^1.4.1",
"core-js": "^2.5.4",
"google-libphonenumber": "^3.2.10",
"i18n-iso-countries": "^6.0.0",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/architect": "~0.801.2",
"@angular-devkit/build-angular": "~0.801.2",
"@angular-devkit/core": "~8.1.2",
"@angular-devkit/schematics": "~8.1.2",
"@angular/cli": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/compiler-cli": "~8.1.2",
"@angular/language-service": "~8.1.2",
"@capacitor/cli": "2.1.0",
"@ionic/angular-toolkit": "^2.1.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^8.9.5",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {}
}
}
Additional context I found "setScreenName:screenClass: must be called after [super viewDidAppear:]." in FIRAnalytics documents
and also found this issue in cordova-firebase-plugin
Thank you!
v.0.2.0 is now published. Please give it a try and let me know of the end result.
I have the same problem within a Vue with capacitor project. Upgrading to 0.2.0 (and fixing the "get remoteConfig()" syntax problem manually https://github.com/capacitor-community/firebase-analytics/pull/26) didn't fix the problem. setScreenName still doesn't work properly.
If there's anything you would suggest testing or tweaking, please inform, I will gladly help with the issue.
I have the same problem within a Vue with capacitor project. Upgrading to 0.2.0 (and fixing the "get remoteConfig()" syntax problem manually #26) didn't fix the problem. setScreenName still doesn't work properly.
If there's anything you would suggest testing or tweaking, please inform, I will gladly help with the issue.
Well, v0.2.0 resolved my issue (setScreenName:screenClass: must be called from the main thread to ensure that events are associated with the intended screen) and my project is Angular with capacitor.
I think "get remoteConfig()" syntax error is different issue. Because that issue is related with TypeScript. Incidentally, I remove "get" in "get remoteConfig()" and It worked.
I hope that you has resolved that issue.😀
@gkrajuska it sounds like this was resolved for Angular projects with v0.2.0, are you still seeing this with Vue?
closing since there was no response if somebody still faces this issue, please, create a new issue and provide a sample app where the issue can be reproduced