Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AppModule)[ShareFile -> ShareFile]: #7

Open
AAlex-11 opened this issue May 29, 2024 · 1 comment

Comments

@AAlex-11
Copy link

AAlex-11 commented May 29, 2024

If the demo apps cannot help and there is no issue for your problem, tell us about it

I use Angular with last version of NS and Angular

     import { ShareFile } from '@finanzritter/nativescript-share-file';
     constructor(
              private shareFile: ShareFile
      ){}
     share(){
                this.shareFile.open({
                path: outfile.path,
                intentTitle: 'Send myVault to:'
               })
      }

Which platform(s) does your issue occur on?

Android

Please, provide the following version numbers that your issue occurs with:

webpack 5.88.2 compiled successfully in 634 ms
Webpack compilation complete. Watching for file changes.
Successfully synced application org.nativescript.MyVaultStart on device emulator-5554.
Successfully transferred runtime.js on device emulator-5554.
Successfully transferred bundle.js on device emulator-5554.
Successfully transferred runtime.dc1630561d5fb35ef2ed.hot-update.js on device emulator-5554.
Successfully transferred bundle.dc1630561d5fb35ef2ed.hot-update.js on device emulator-5554.
Successfully transferred runtime.dc1630561d5fb35ef2ed.hot-update.json on device emulator-5554.
Refreshing application on device emulator-5554...
Angular is running in development mode.
ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AppModule)[ShareFile -> ShareFile]:
NullInjectorError: No provider for ShareFile!
NullInjectorError: R3InjectorError(AppModule)[ShareFile -> ShareFile]:
NullInjectorError: No provider for ShareFile!
at NullInjector.get (file: src\webpack:\myvaultstart\node_modules@angular\core\fesm2022\core.mjs:8890:26)
at R3Injector.get (file: src\webpack:\myvaultstart\node_modules@angular\core\fesm2022\core.mjs:9334:32)
at R3Injector.get (file: src\webpack:\myvaultstart\node_modules@angular\core\fesm2022\core.mjs:9334:32)
at ChainedInjector.get (file: src\webpack:\myvaultstart\node_modules@angular\core\fesm2022\core.mjs:14018:35)
at lookupTokenUsingModuleInjector (file: src\webpack:\myvaultstart\node_modules@angular\core\fesm2022\core.mjs:4608:38)
at getOrCreateInjectable (file: src\webpack:\myvaultstart\node_modules@angular\core\fesm2022\core.mjs:4656:11)
at Module.ɵɵdirectiveInject (file:///data/data/org.nativescript.MyVaultStart/files/ap...
[HMR][dc1630561d5fb35ef2ed] success | Successfully applied update.
device: emulator-5554 debug port: 40000

Please, tell us how to recreate the issue in as much detail as possible.

I have configured provider

ShareFileProvider-05302024_234740_1

And I use Angular - I inject module and try to use it

ShareFileProvider-05302024_235604_1

and than just white screen
what is my mistake?

@AAlex-11 AAlex-11 reopened this May 30, 2024
sc85 added a commit that referenced this issue Jun 1, 2024
@sc85
Copy link
Collaborator

sc85 commented Jun 1, 2024

@AAlex-11 I never used Angular and haven't touched NativeScript in more than 2 years. Nevertheless, I had a look at the demo app of the project and it did no longer work without some changes. Please have a look if this changes anything for you at all.
Please note that the plugin does not fully work within an emulator but at least it should start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants