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

Incorrect result or user canceled the action #89

Closed
tiplonski opened this issue Nov 28, 2020 · 5 comments
Closed

Incorrect result or user canceled the action #89

tiplonski opened this issue Nov 28, 2020 · 5 comments

Comments

@tiplonski
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]
  • Cordova Version [e.g. 8.0.0]
  • Cordova Platform [iOS]
  • Cordova Platform Version [4.5.5]

Additional context
Add any other context about the problem here.

Hello,

I have updated to the newest version of 4.6.2 and I am running the newest version of Android on my Samsung Galaxy Note 20. I have also upgraded to the newest CLI of Ionic. The problem is I am getting the following error when pressing "OK" after taking a picture:

Incorrect result or user canceled the action

Please let me know if anyone else has had the same or similar error.

@ChrisTomAlx
Copy link
Collaborator

Could you try the beta version and see if that solves the issue. You can look at this comment to get an idea how to do this

Cheers and have a nice day :)
Chris
Neutrinos

@tiplonski
Copy link
Author

Hello Chris,

That looked to resolve the issue. Thanks!

-Tim

@ciclick
Copy link

ciclick commented Dec 23, 2020

Hello Chris, I've just updated to the beta version but now Android Studio returns this errors:

Task :app:processDebugManifest FAILED
/Users/toniarrebola/projectesGIT/bacs_app/android/app/src/main/AndroidManifest.xml:36:13-64 Error:
Attribute provider#androidx.core.content.FileProvider@authorities value=(io.ionic.starter.fileprovider) from AndroidManifest.xml:36:13-64
is also present at [com.github.NeutrinosPlatform:scanlibrary:3.2] AndroidManifest.xml:32:13-76 value=(io.ionic.starter.com.scanlibrary.provider).
Suggestion: add 'tools:replace="android:authorities"' to element at AndroidManifest.xml:34:9-42:20 to override.
/Users/toniarrebola/projectesGIT/bacs_app/android/app/src/main/AndroidManifest.xml:41:17-51 Error:
Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/file_paths) from AndroidManifest.xml:41:17-51
is also present at [com.github.NeutrinosPlatform:scanlibrary:3.2] AndroidManifest.xml:37:17-55 value=(@xml/provider_paths).
Suggestion: add 'tools:replace="android:resource"' to element at AndroidManifest.xml:39:13-41:64 to override.

I use capacitor

Thank you

@SauloLauers
Copy link

I still have that same problem. It seems to happen on android 10 and bellow. I tried with may android versions, at android 11 it works.

` openScanner() {
LoadingUtil.showLoading(this.loadingCtrl);
let opts: DocumentScannerOptions = {};

    this.documentScanner.scanDoc(opts)
        .then((fileUri: string) => {
            console.log('documentScanner.scanDoc');
            console.log(fileUri);
            if (this.platform.is('android')) {
                this.getAndroidRealPath(fileUri).subscribe(realPath => {
                    this.enviaArquivoDigital(fileUri, this.getExtensaoArquivo(realPath));
                });
            } else {
                fileUri = fileUri.indexOf('file://') == 0 ? fileUri : 'file://' + fileUri;
                this.enviaArquivoDigital(fileUri, this.getExtensaoArquivo(fileUri));
            }
            LoadingUtil.dismiss();
        })
        .catch((error: any) => {
            LoadingUtil.dismiss();
            console.log('erro ao anexar arquivo da camera');
            console.log(error)
        });
}`

It used to work. But now we had to increase the mininum API lvl, and it started.

@sergiuturus
Copy link

sergiuturus commented Feb 10, 2021

Any updates on this? I get the same error + android studio error @ciclick described

Adding android:requestLegacyExternalStorage="true" to the AndroidManifest.xml seems to fix the problem but idk if this is a viable solution as @ChrisTomAlx noted here #82 (comment)

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

4 participants