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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example App should be able to build and run without Firebase configured via google-services.json #318

Closed
QuintinWillison opened this issue Feb 7, 2022 · 1 comment 路 Fixed by #344
Labels
code-quality Affects the developer experience when working in our codebase.

Comments

@QuintinWillison
Copy link
Contributor

QuintinWillison commented Feb 7, 2022

Friction is way too high for those who wish to test the SDK without support for push notifications.

Relates to #316.

I observed on my local machine:

{code}
example % flutter build apk

馃挭 Building with sound null safety 馃挭

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processReleaseGoogleServices'.

File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
/Users/quintinwillison/code/ably/ably-flutter/example/android/app/src/release/google-services.json
/Users/quintinwillison/code/ably/ably-flutter/example/android/app/src/google-services.json
/Users/quintinwillison/code/ably/ably-flutter/example/android/app/src/Release/google-services.json
/Users/quintinwillison/code/ably/ably-flutter/example/android/app/google-services.json

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org/

BUILD FAILED in 56s
Running Gradle task 'assembleRelease'... 56.8s
Gradle task assembleRelease failed with exit code 1
{code}
@ikurek [responded (internal Slack message) that|https://ably-real-time.slack.com/archives/C0178QGC093/p1644237008457189?thread_ts=1644236687.002689&cid=C0178QGC093]:

I agree, but sadly there鈥檚 no easy way to solve this - as long as we embed Firebase into the project, this file will be required with each start. For now the only options I can see are:

  • Include some sample google-services.json file attached to example Firebase instance (I don鈥檛 think it鈥檚 the best idea TBH)
  • Create separate example for push notifications

I wonder if there's another approach, given how flexible Gradle is, where the build can detect if {{google-services.json}} is present and only enable the Google Services Plugin / Firebase complexities in that case. 馃

@QuintinWillison QuintinWillison added the code-quality Affects the developer experience when working in our codebase. label Feb 7, 2022
@QuintinWillison
Copy link
Contributor Author

@ikurek is going to research what we can do in terms of supplying a dummy/inert Google services JSON file in order to allow the example app to run without friction. For users who need to do PN testing with the app, we need to make sure there are instructions in the repo (contributing guide? PN guide?) that explain that they need to replace the dummy services file with their own, obtained from Firebase. Igor has also suggested we could also display some kind of disclaimer in the sample app to highlight that the runtime has detected that they're using a dummy GS file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-quality Affects the developer experience when working in our codebase.
Development

Successfully merging a pull request may close this issue.

1 participant