Title: Cannot read property 'call' of undefined · Issue #2372 · NativeScript/nativescript-angular · GitHub
Open Graph Title: Cannot read property 'call' of undefined · Issue #2372 · NativeScript/nativescript-angular
X Title: Cannot read property 'call' of undefined · Issue #2372 · NativeScript/nativescript-angular
Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): There is my package.json { "nativescript": { "id...
Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): There is...
X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): There is...
Opengraph URL: https://github.com/NativeScript/nativescript-angular/issues/2372
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cannot read property 'call' of undefined","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n\r\nThere is my package.json\r\n\r\n```\r\n{\r\n \"nativescript\": {\r\n \"id\": \"org.nativescript.VisualyScan\",\r\n \"tns-android\": {\r\n \"version\": \"6.5.3\"\r\n },\r\n \"tns-ios\": {\r\n \"version\": \"6.5.2\"\r\n }\r\n },\r\n \"description\": \"NativeScript Application\",\r\n \"license\": \"SEE LICENSE IN \u003cyour-license-filename\u003e\",\r\n \"repository\": \"\u003cfill-your-repository-here\u003e\",\r\n \"dependencies\": {\r\n \"@angular/animations\": \"~8.2.0\",\r\n \"@angular/common\": \"~8.2.0\",\r\n \"@angular/compiler\": \"~8.2.0\",\r\n \"@angular/core\": \"~8.2.0\",\r\n \"@angular/forms\": \"~8.2.0\",\r\n \"@angular/http\": \"8.0.0-beta.10\",\r\n \"@angular/platform-browser\": \"~8.2.0\",\r\n \"@angular/platform-browser-dynamic\": \"~8.2.0\",\r\n \"@angular/router\": \"~8.2.0\",\r\n \"@nativescript/theme\": \"^3.0.1\",\r\n \"@ngx-translate/core\": \"^11.0.1\",\r\n \"@ngx-translate/http-loader\": \"^4.0.0\",\r\n \"@nstudio/nativescript-camera-plus\": \"^4.1.0\",\r\n \"@nstudio/nativescript-loading-indicator\": \"^1.0.0\",\r\n \"@nstudio/nativescript-pulltorefresh\": \"^2.0.0\",\r\n \"@nstudio/nativescript-snackbar\": \"^1.1.2\",\r\n \"nativescript-angular\": \"^8.20.4\",\r\n \"nativescript-background-http\": \"^4.2.1\",\r\n \"nativescript-camera\": \"^4.4.0\",\r\n \"nativescript-datetimepicker\": \"^1.2.3\",\r\n \"nativescript-geolocation\": \"^5.1.0\",\r\n \"nativescript-imagecropper\": \"^3.0.0\",\r\n \"nativescript-imagepicker\": \"^7.1.0\",\r\n \"nativescript-nfc\": \"4.0.1\",\r\n \"nativescript-permissions\": \"^1.3.8\",\r\n \"nativescript-plugin-firebase\": \"^10.6.3\",\r\n \"nativescript-sound-kak\": \"^1.2.0\",\r\n \"nativescript-theme-core\": \"~1.0.4\",\r\n \"nativescript-ui-chart\": \"^7.1.1\",\r\n \"nativescript-ui-sidedrawer\": \"^8.0.1\",\r\n \"nativescript-webview-interface\": \"^1.4.2\",\r\n \"reflect-metadata\": \"~0.1.10\",\r\n \"rxjs\": \"^6.4.0\",\r\n \"tns-core-modules\": \"^6.3.2\",\r\n \"zone.js\": \"^0.9.1\"\r\n },\r\n \"devDependencies\": {\r\n \"@angular/compiler-cli\": \"~8.2.0\",\r\n \"@nativescript/schematics\": \"~0.5.0\",\r\n \"@ngtools/webpack\": \"~8.2.0\",\r\n \"@types/jasmine\": \"^3.5.11\",\r\n \"nativescript-dev-webpack\": \"^1.4.1\",\r\n \"tns-platform-declarations\": \"6.0.1\",\r\n \"typescript\": \"~3.5.3\"\r\n },\r\n \"readme\": \"NativeScript Application\"\r\n}\r\n```\r\n \r\n**Describe the bug**\r\nI upgraded from nativescript 6 to 8.1.5, and since then, every http call that i do give me the following error:\r\n\r\n\u003e TypeError: Cannot read property 'call' of undefined\r\n\r\nFrom what i found on the internet it may be related to webpack but i don't know.\r\n\r\n**To Reproduce**\r\nUpgrade a project from nativescript 6 to 8.1.5 and make an http call.\r\n\r\n**Expected behavior**\r\nHTTP call to work\r\n\r\n**Additional context**\r\nmain.ts\r\n\r\n```\r\n// this import should be first in order to load some required settings (like globals and reflect-metadata)\r\nimport Theme from \"@nativescript/theme\";\r\nimport { runNativeScriptAngularApp, platformNativeScript } from '@nativescript/angular';\r\n\r\nimport { AppModule } from \"./app/app.module\";\r\nimport 'zone.js';\r\nrunNativeScriptAngularApp({\r\n appModuleBootstrap: () =\u003e platformNativeScript().bootstrapModule(AppModule),\r\n });\r\n\r\nTheme.setMode(Theme.Light);\r\n```\r\n\r\nwebpack.config.js\r\n\r\n```\r\nconst webpack = require(\"@nativescript/webpack\");\r\n\r\nmodule.exports = (env) =\u003e {\r\n\twebpack.init(env);\r\n\r\n\t// Learn how to customize:\r\n\t// https://docs.nativescript.org/webpack\r\n\r\n\treturn webpack.resolveConfig();\r\n};\r\n```\r\n\r\ntnsconfig.tns.json\r\n\r\n```\r\n{\r\n \"extends\": \"./tsconfig\",\r\n \"compilerOptions\": {\r\n \"module\": \"esNext\",\r\n \"moduleResolution\": \"node\"\r\n }\r\n}\r\n```\r\n\r\napp.module.ts\r\n\r\n```\r\nimport { NgModule, NO_ERRORS_SCHEMA } from \"@angular/core\";\r\nimport { NativeScriptModule, NativeScriptHttpClientModule, NativeScriptFormsModule, ModalDialogService, NativeScriptRouterModule, NativeScriptCommonModule } from \"@nativescript/angular\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\n\r\nimport { AppRoutingModule } from \"./app-routing.module\";\r\nimport { AppComponent } from \"./app.component\";\r\nimport { NfcService } from \"./services/nfc/nfc.service\";\r\nimport { Auth0Service } from \"./services/auth0/auth0.service\";\r\nimport { LoginComponent } from './login/login.component';\r\n\r\nimport { ForgotPasswordComponent } from './forgot-password/forgot-password.component';\r\nimport { HomeComponent } from './home/home.component';\r\nimport { ScanComponent } from './scan/scan.component';\r\nimport { ParentsViewComponent } from './parents-view/parents-view.component';\r\nimport { SupportComponent } from './support/support.component';\r\nimport { ConvertService } from \"./services/convert/convert.service\";\r\nimport { DisableOnTapDirective } from \"./disableOnTap-directive/disable-on-tap.directive\";\r\nimport { PictureService } from \"./services/picture/picture.service\";\r\n\r\n\r\nimport { SettingsComponent } from './settings/settings.component';\r\nimport { SettingsIconComponent } from './settings-icon/settings-icon.component';\r\nimport { ScanQuestionsService } from \"./services/ScanQuestionsService/ScanQuestions.service\";\r\nimport { NativeScriptUISideDrawerModule } from \"nativescript-ui-sidedrawer/angular\";\r\nimport { EnterExitHistoryComponent } from \"./enter-exit-history/enter-exit-history.component\";\r\nimport { NativeScriptDateTimePickerModule } from \"@nativescript/datetimepicker/angular\";\r\nimport { SchoolService } from \"./services/school/school.service\";\r\nimport { CreateEditAccessComponent } from \"./create-edit-access/create-edit-access.component\";\r\nimport { StatisticsComponent } from \"./statistics/statistics.component\";\r\nimport { NativeScriptUIChartModule } from \"nativescript-ui-chart/angular\";\r\nimport { StatisticsDetailsViewComponent } from \"./statistics-details-view/statistics-details-view.component\";\r\nimport { DocumentViewComponent } from \"./document-view/document-view.component\";\r\nimport { AddDocumentComponent } from \"./add-document/add-document.component\";\r\nimport { EnterExitPictureComponent } from \"./enter-exit-picture/enter-exit-picture.component\";\r\nimport { CustomCameraComponent } from \"./custom-camera/custom-camera.component\";\r\nimport { SearchProfilModalComponent } from \"./search-profil-modal/search-profil-modal.component\";\r\nimport { SearchIconComponent } from \"./search-icon/search-icon.component\";\r\nimport { VolumeComponent } from \"./volume/volume.component\";\r\nimport { SnackbarService } from \"./services/snackbar/snackbar.service\";\r\n\r\n\r\n@NgModule({\r\n bootstrap: [\r\n AppComponent\r\n ],\r\n imports: [\r\n NativeScriptModule,\r\n AppRoutingModule,\r\n NativeScriptRouterModule,\r\n NativeScriptHttpClientModule,\r\n NativeScriptFormsModule,\r\n NativeScriptUISideDrawerModule,\r\n NativeScriptCommonModule,\r\n NativeScriptDateTimePickerModule,\r\n NativeScriptUIChartModule\r\n ],\r\n declarations: [\r\n AppComponent,\r\n LoginComponent,\r\n ForgotPasswordComponent,\r\n HomeComponent,\r\n ScanComponent,\r\n ParentsViewComponent,\r\n SupportComponent,\r\n DisableOnTapDirective,\r\n SettingsComponent,\r\n SettingsIconComponent,\r\n EnterExitHistoryComponent,\r\n CreateEditAccessComponent,\r\n StatisticsComponent,\r\n StatisticsDetailsViewComponent,\r\n DocumentViewComponent,\r\n AddDocumentComponent,\r\n EnterExitPictureComponent,\r\n CustomCameraComponent,\r\n SearchProfilModalComponent,\r\n SearchIconComponent,\r\n VolumeComponent\r\n ],\r\n schemas: [\r\n NO_ERRORS_SCHEMA\r\n ],\r\n providers: [\r\n NfcService,\r\n Auth0Service,\r\n ConvertService,\r\n PictureService,\r\n ModalDialogService,\r\n ScanQuestionsService,\r\n SchoolService,\r\n SnackbarService\r\n ],\r\n entryComponents: [ParentsViewComponent,StatisticsDetailsViewComponent,EnterExitPictureComponent,CustomCameraComponent,SearchProfilModalComponent]\r\n})\r\nexport class AppModule { }\r\n\r\n```","author":{"url":"https://github.com/kriefsacha","@type":"Person","name":"kriefsacha"},"datePublished":"2021-12-23T12:08:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/2372/nativescript-angular/issues/2372"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:88242389-06af-9d08-69fb-dde58f0c76fd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9EC6:2D3E98:7DD0730:A2B27A7:6975D3F3 |
| html-safe-nonce | 148afc1dccbba2c4390757e52f7e3064e1ed44d5cb665ac87f3df38758cfb9a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUM2OjJEM0U5ODo3REQwNzMwOkEyQjI3QTc6Njk3NUQzRjMiLCJ2aXNpdG9yX2lkIjoiNzk0MzIwMzgxNzExMTU0MDcyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 37f8cb0407b99fe00803314b557f45dafbd4b846573787d5a86e8f26a960dadd |
| hovercard-subject-tag | issue:1087658612 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-angular/2372/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f3570ea12bdcb8f3ba631da3972d5894a26f7f8a0c8be01ac255aa877f1eef9b/NativeScript/nativescript-angular/issues/2372 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f3570ea12bdcb8f3ba631da3972d5894a26f7f8a0c8be01ac255aa877f1eef9b/NativeScript/nativescript-angular/issues/2372 |
| og:image:alt | Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): There is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kriefsacha |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/nativescript-angular git https://github.com/NativeScript/nativescript-angular.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 35951404 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35951404 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width