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

Invalid argument(s): The given string does not have the correct begin marker expected in a PEM file #21

Open
ghost opened this issue Oct 23, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 23, 2021

When I try to run the example from the source code, whenever it reaches the very first line in the main class:
var credential = Credentials.applicationDefault();

it triggers the Unhandled exception shown below.
I'm using the "service-account.json" file approach.
Could you please guide me on what to look for on this issue?

Thanks

Invalid argument(s): The given string does not have the correct begin marker expected in a PEM file.
#0 parsePem (package:x509/src/x509_base.dart:257:7)
#1 _SyncIterator.moveNext (dart:core-patch/core_patch.dart:183:26)
#2 Iterable.first (dart:core/iterable.dart:489:13)
#3 new Certificate.fromJson (package:firebase_admin/src/auth/credential.dart:42:34)
#4 new ServiceAccountCredential.fromJson (package:firebase_admin/src/auth/credential.dart:82:35)
#5 new ServiceAccountCredential (package:firebase_admin/src/auth/credential.dart:88:41)
#6 Credentials._credentialFromFile (package:firebase_admin/src/credential.dart:190:14)
#7 Credentials._getApplicationDefault (package:firebase_admin/src/credential.dart:138:14)
#8 Credentials.applicationDefault (package:firebase_admin/src/credential.dart:77:33)
#9 main (file:///D:/OneDrive%20-%20Softtek/AppDev/firebase_admin/example/main.dart:11:32)
#10 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:283:19)
#11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

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

0 participants