contentful / vault

Easy persistence of Contentful data for Android over SQLite.
https://contentful.github.io/vault/
Apache License 2.0
85 stars 19 forks source link

VaultDatabaseExporter Broken in 3.2.3 #158

Closed Crylic closed 3 years ago

Crylic commented 4 years ago

Pull request #157 broke the VaultDatabaseExporter since the environment ID has not been set and no functionality is exposed to actually set the environment ID in the exporter.

Would like to see that VaultDatabaseExporter gets extended to be able to set the environment ID.

java.lang.NullPointerException: Environment ID must not be null. at com.contentful.java.cda.Util.checkNotNull(Util.java:26) at com.contentful.java.cda.CDAClient.validate(CDAClient.java:96) at com.contentful.java.cda.CDAClient.<init>(CDAClient.java:81) at com.contentful.java.cda.CDAClient$Builder.build(CDAClient.java:770) at com.contentful.vault.SyncConfig.<init>(SyncConfig.java:49) at com.contentful.vault.SyncConfig$Builder.build(SyncConfig.java:124) at com.contentful.vault.VaultDatabaseExporter.export(VaultDatabaseExporter.java:44)

rafalniski commented 3 years ago

Hey @Crylic ,

I created a small PR here - https://github.com/contentful/vault/pull/161 - would you mind take a look if that resolves your problem?

rafalniski commented 3 years ago

This should be fixed in 3.2.5