google / google/googleapis.dart

clientId.secret cannot be null.. Error thrown null.

Open
#379 6 comments 0 reactions 1 assignee Claimed by @kevmoo View on GitHub
bug package:googleapis_auth
Dominant language
Dart
Stars
419
Forks
136
Avg merge
1h 21m
Merged PRs (30d)
5

Description

If I create a client id in dart code like this:
`final ClientId clientId = ClientId.serviceAccount(AppConstants.GOOGLE_API_CLIENT_ID);`

It crashes here:
```
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Invalid argument(s): clientId.secret cannot be null.. Error thrown null.
at .refreshCredentials(.java:101)
at AutoRefreshingClient.send(AutoRefreshingClient.java:114)
at ApiRequester._request.simpleRequest(_request.java:220)
at ApiRequester._request(ApiRequester.java:263)
at ApiRequester.request(ApiRequester.java:69)
at AboutResource.get(AboutResource.java:141)
at GoogleDrive.upload(GoogleDrive.java:46)
```
Because clientId.secret is null, if I use serviceAccount. It works when I use ClientId(AppConstants.GOOGLE_API_CLIENT_ID, ''). Am I doing something wrong here? What is the point of ClientId.serviceAccount, if it cannot be used?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.