realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.74k stars 565 forks source link

[Fatal Error] realm-annotations-processor-10.11.1.pom:2:1: Content is not allowed in prolog #6443

Closed amorimcode closed 7 months ago

amorimcode commented 7 months ago

How frequently does the bug occur?

Description

Cant build project after upgrading react native from 0.68 to 0.71.7

Stacktrace & log output

yarn run v1.22.4
$ cd packages/mobile/android && ./gradlew clean && cd ../ && yarn android && yarn start --reset-cache

> Configure project :app
WARNING:API 'android.registerTransform' is obsolete.
It will be removed in version 8.0 of the Android Gradle plugin.
The Transform API is removed to improve build performance. Projects that use the
Transform API force the Android Gradle plugin to use a less optimized flow for the
build that can result in large regressions in build times. It’s also difficult to
use the Transform API and combine it with other Gradle features; the replacement
APIs aim to make it easier to extend the build without introducing performance or
correctness issues.

There is no single replacement for the Transform API—there are new, targeted
APIs for each use case. All the replacement APIs are in the
`androidComponents {}` block.

The Transform API uses incremental APIs deprecated since Gradle 7.5. Please add
`android.experimental.legacyTransform.forceNonIncremental=true` to
`gradle.properties` to fix this issue. Note that this will run transforms
non-incrementally and may have a build performance impact.
For more information, see https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-api.
To determine what is calling android.registerTransform, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.

Installing unimodules:
 unimodules-core@7.1.2 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/@unimodules/core
 unimodules-react-native-adapter@6.3.9 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/@unimodules/react-native-adapter
 expo-constants@11.0.2 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/expo-constants
 expo-file-system@11.1.3 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/expo-file-system
 expo-image-loader@2.2.0 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/expo-image-loader
 expo-local-authentication@11.1.1 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/expo-local-authentication
 expo-modules-core@0.2.0 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/expo-modules-core
 unimodules-app-loader@2.2.0 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/unimodules-app-loader
 unimodules-task-manager-interface@6.2.0 from /Users/mblabs/mblabs/bankeiro_app/packages/mobile/node_modules/unimodules-task-manager-interface
Configuration '_agp_internal_javaPreCompileDebugAndroidTest_kaptClasspath' was resolved during configuration time.
This is a build performance and scalability issue.
See https://github.com/gradle/gradle/issues/2298
Run with --info for a stacktrace.
[Fatal Error] realm-annotations-processor-10.11.1.pom:2:1: Content is not allowed in prolog.
[Fatal Error] realm-annotations-processor-10.11.1.pom:2:1: Content is not allowed in prolog.
[Fatal Error] javawriter-2.5.1.pom:2:1: Content is not allowed in prolog.
[Fatal Error] realm-annotations-10.11.1.pom:2:1: Content is not allowed in prolog.
[Fatal Error] kotlin-stdlib-jdk8-1.5.31.pom:2:1: Content is not allowed in prolog.
[Fatal Error] bson-3.12.1.pom:2:1: Content is not allowed in prolog.
[Fatal Error] kotlin-stdlib-jdk7-1.5.31.pom:2:1: Content is not allowed in prolog.
[Fatal Error] kotlin-stdlib-1.5.31.pom:2:1: Content is not allowed in prolog.
[Fatal Error] kotlin-stdlib-common-1.5.31.pom:2:1: Content is not allowed in prolog.
[Fatal Error] annotations-13.0.pom:2:1: Content is not allowed in prolog.

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

11.0.0-rc.0

What services are you using?

Local Database only

Are you using encryption?

Platform OS and version(s)

Mac OS Sonoma

Build environment

Which debugger for React Native: ..

React native 0.71.7

Cocoapods version

No response

kraenhansen commented 7 months ago

realm@11.0.0-rc.0 is not actively maintained and you should upgrade to a newer version of realm. Regardless ... I'm surprised to see realm-annotations-processor in the error, as this is a concept from realm-java. Are you using multiple Realm SDKs in your app?

I'm closing this for now, feel free to create a new issue if it persists after upgrading to a recent version of our package and can provide a reproduction for us to try 👍

amorimcode commented 7 months ago

realm@11.0.0-rc.0 is not actively maintained and you should upgrade to a newer version of realm. Regardless ... I'm surprised to see realm-annotations-processor in the error, as this is a concept from realm-java. Are you using multiple Realm SDKs in your app?

I'm closing this for now, feel free to create a new issue if it persists after upgrading to a recent version of our package and can provide a reproduction for us to try 👍

My project had the realm installed in package.json and the java SDK settings too, perhaps this caused the problem? https://www.mongodb.com/docs/realm/sdk/java/install/