After Realm Java upgrade and downgrade, crash with RealmFileException: Unsupported Realm file format version. line 101 Kind: ACCESS_ERROR - realm

I upgraded Realm version from io.realm:realm-gradle-plugin:5.1.0 to 10.8.1 with no issue. However, then I had to test an earlier version of my app, so I completely uninstalled the app that used 10.8.1 from the phone and reinstalled the app that used Realm 5.1.0. I then get a crash when opening a Realm for the first time with the following error:
io.realm.exceptions.RealmFileException: Unable to open a realm at path '/data/data/com.my.app/files/fileName.realm':
Unsupported Realm file format version. (Unsupported Realm file format version) (/data/data/com.my.app/files/fileName.realm)
in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp
line 101 Kind: ACCESS_ERROR.
It's like the file already exists, even after a fresh install.

I fixed this by adding Realm.delete(configuration) when the app - the one using 5.1.0 - first started just to manually delete the file the exception was complaining about. Then I removed the Realm.delete line and did another fresh install. Everything worked fine after that.

Related

I can't configure MacOS project to work with Firebase

I have added the GoogleService-info-plist to the project.
I have checked and both the MacOs project and the Firebase's project have the same BundleID.
I also had donde several projects with iOS/SWiftUI and Firebase with no issues.
This is the first time I'm trying to connect Firebase to a MacOs project.
I have also deleted the GoogleService-info-plist file from the MacOs project, downloaded it again and added it via the XCode project/Add file process but I'm still getting this crash message...
2022-01-13 11:03:44.260253-0500 WebScraper[33494:19053189] 8.10.0 - [Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
2022-01-13 11:03:44.268425-0500 WebScraper[33494:19052756] *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'FirebaseApp.configure() could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.
Any ideas?

Error staging application: App staging failed in the buildpack compile phase in HWC Buildpack

I am trying to deploy my application built in ASP.Net 4.6.1. So I am using HWC Buildpack.
Below is my manifest.yml
---
applications:
- name: DRSN
random-route: true
memory: 128M
buildpack:
https://github.com/cloudfoundry/hwc-buildpack.git
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
The error that I am receiving is below.
Waiting for API to complete processing files...
Staging app and tracing logs...
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 creating container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 successfully created container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Downloading app package...
Downloading build artifacts cache...
Downloaded build artifacts cache (231B)
Downloaded app package (19.5M)
Failed to compile droplet: Failed to compile droplet: fork/exec /tmp/buildpackdownloads/6c6dca8d638ac0d145d6581f9eb9a96a/bin/compile: permission denied
Exit status 223
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 stopping instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 destroying container for instance 34107c3c-1acb-4aa5-b435-b06516abcfcb
Error staging application: App staging failed in the buildpack compile phase
Can anyone help me resolve this issue? Am I not correct in my manifest.yml? Or is it something else?
I believe that the problem is that you're telling the system to use the HWC buildpack, but at the same time you're not setting the Windows stack (at least based on what info I can see). That means it's going to default to the Linux stack, which I believe is why you're seeing the fork/exec /tmp/buildpackdownloads/... error.
Try adding stack: windows to your manifest.yml or -s windows to your cf push command (for future reference, when you need help always include the full cf push command you're running).
PS: you shouldn't use https://github.com/cloudfoundry/hwc-buildpack.git that is telling the system to grab the master branch in whatever state it's currently in. That's a.) not reproducible and b.) not guaranteed to be in a working state. You should either use the platform provided buildpack names (from cf buildpacks) or append #<branch_or_tag> to the end of the URL so it picks a specific branch. All CF Buildpacks have tags for each release. It's strongly recommended you use a tagged release.

Flutter - http.get fails on macos build target: Connection failed

I started porting my Flutter app to macos Desktop. The UI started fine. However, as soon as the app makes a network call, it fails instantly with Connection failed (OS Error: Operation not permitted).
Running a one-liner:
final response = await http.get('https://jsonplaceholder.typicode.com/posts/1');
fails with:
Unhandled Exception: SocketException: Connection failed (OS Error:
Operation not permitted, errno = 1),
address = jsonplaceholder.typicode.com, port = 443
#0 IOClient.send (package:http/src/io_client.dart:33:23)
The macos build target comes from Google's sample here.
Flutter (Channel master, v1.9.8-pre.108)
Per my comment on the other answer, you should not use the Xcode capabilities UI for this. It will not correctly handle the two separate entitlement files in a Flutter project.
You need to add:
<key>com.apple.security.network.client</key>
<true/>
to macos/Runner/DebugProfile.entitlements and macos/Runner/Release.entitlements.
This is documented here and here.
Your macOS XCode project lacks Internet permission called "Outgoing Connections (Client)".
Open your macos xcode project - [root]/macos/Runner.xcworkspace
Click "Runner" in Project navigator - general settings will show up. Select "Capabilities" from tabbar and tick option "Outgoing Connections (Client)".
Rebuild your application inside XCode and launch the project.
If you are getting this error Only in Android release then Internet permission must be missing from main manifest. You just need to add Internet permission in Manifest file.
Just add this permission in manifest <uses-permission android:name="android.permission.INTERNET"/>
There are three manifest file available in Android folder
app/src/debug
app/src/main
app/src/profile

Cause: org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl

I have connected my Android application with firebase-database by putting this dependency (kapt 'com.google.firebase:firebase-database:16.0.1:15.0.0') but after that I am getting errors like the one mentioned in title also when I synchronized the project I am getting different errors like: Connection time out, Failed to resolved build listener.
Enabling/Disabling offline work and setting proxy in gradle.properties file doesn't work for me.
Also you guys have seen that I used 'kapt' in dependency as it is necessary to use, without it I am getting error "failed to resolve 15.0.0". Removing 15.0.0 doesn't work for me.
Error
Cause:org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl.getModuleIdentifier()Lorg/gradle/api/artifacts/ModuleIdentifier;ing
I am using Android Studio 3.2 and sadly I can't update this version.
Gradle version: 5.1.1 and
Plugin version: 3.4.0

Unable to install spring IDE in eclipse mars/neon

getting the below error while installing spring IDE from eclipse market place
An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Unable to read repository at http: //dist.springsource.com/release/TOOLS/update/3.8.4.RELEASE/e4.5/features/org.springframework.ide.eclipse.aop.feature_3.8.4.201703310634-RELEASE.jar.
Read timed out
Unable to read repository at http: //dist.springsource.com/release/TOOLS/update/3.8.4.RELEASE/e4.5/plugins/org.springframework.ide.eclipse.config.graph_3.8.4.201703310634-RELEASE.jar.
Read timed out
Unable to read repository at http ://dist.springsource.com/release/TOOLS/update/3.8.4.RELEASE/e4.5/features/org.springframework.ide.eclipse.roo.feature_3.8.4.201703310634-RELEASE.jar.
Read timed out
Unable to read repository at http: //dist.springsource.com/release/TOOLS/update/3.8.4.RELEASE/e4.5/plugins/org.springframework.ide.eclipse.webflow.core_3.8.4.201703310634-RELEASE.jar.
Read timed out
Check for Eclipse updates at first
Goto Windows-> peferences -> Install/Update -> Available software Sites,update "http://download.springsource.com" instead of "http://dist.springsource.com". restart Eclipse, and add it back.
And select help>install new software>contact all update sites (check)
I did this for Eclipse Mars version
I am using the Eclipse Oxygen Release (4.7.0) and I followed the solution suggested by #Vasath.
In the list of Available software sites, I edited "SpringSource Update Site for Eclipse 4.7" by replacing
http://download.springsource.com/release/TOOLS/update/e4.7 with
http://dist.springsource.com/release/TOOLS/update/e4.7.
It worked, Spring IDE is installed and working fine.

Resources