0

after running application using runagent and it throws error

agent library failed to init: native-image-agent
native-image-agent: Error: com.oracle.svm.core.util.json.JSONParserException: first level of document must be an array of serialization lists```

i am currently using gluon's graalvm-svm-java11-darwin-gluon-22.0.0.2-Final what could be the issue. 


this happens when i run on mac
leksyde
  • 45
  • 6
  • Can you post the content of your serialization json file under `src/resources/META-INF/native-image`? – José Pereda Jun 19 '22 at 09:56
  • `[ { "types":[ ], "lambdaCapturingTypes":[ ] } ] ' – leksyde Jun 19 '22 at 12:09
  • @JoséPereda its just that – leksyde Jun 19 '22 at 12:10
  • Can you try again but removing that file? – José Pereda Jun 19 '22 at 12:13
  • i have it is created again once i run `runagent` ` { "types":[ ], "lambdaCapturingTypes":[ ] } – leksyde Jun 19 '22 at 12:17
  • Also tried deleting the entire `target` folder. it is recreated once i do `runagent` – leksyde Jun 19 '22 at 12:19
  • Does `gluonfx:runagent` end successfully? Then remove the serialization file from `src/resources/META-INF/native-image`, don't run `mvn gluonfx:runagent` again, and just try `mvn gluonfx:build`? – José Pereda Jun 19 '22 at 12:20
  • `first level of document must be an array of serialization lists [Sun Jun 19 13:22:11 WAT 2022][INFO] [SUB] Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option SerializationConfigurationResources. [Sun Jun 19 13:22:11 WAT 2022][INFO] [SUB] com.oracle.svm.core.util.UserError$UserException: Error parsing serialization configuration in file:/Users/lek-syde/Documents/ATTEND%20APP/testrepo-main/target/classes/META-INF/native-image/serialization-config.json:` – leksyde Jun 19 '22 at 12:28
  • @JoséPereda what i got after `mvn gluonfx:build` – leksyde Jun 19 '22 at 12:29
  • Remove the `target` folder and try `mvn gluonfx:build` again? You still have the file there. – José Pereda Jun 19 '22 at 12:30
  • i did that [link] https://gist.github.com/lek-syde/f8b34b4b8bcde9433696405ab31e67fc – leksyde Jun 19 '22 at 12:36
  • @JoséPereda i removed the target also this worked successfully using graalvm `22.1.0.1-Final` but i had errors on logcat when i ran the app on ios device, so i switch to `22.0.0.2-Final` since that was what worked for android – leksyde Jun 19 '22 at 12:45
  • I'm not following... The error still shows you have `target/classes/META-INF/native-image/serialization-config.json`. Remove `target` and remove `src/resources/META-INF/native-image/serialization-config.json`, _don't_ run `runagent` again, then try `gluonfx:build`. You should be able to use plugin 1.0.14 with 22.1.0.1-Final. And don't set `JAVA_HOME` to a different GraalVM version... – José Pereda Jun 19 '22 at 12:53
  • thank! @JoséPereda i was deleting the wrong file all along. deleting just the target it workss now. thank for your patience! – leksyde Jun 19 '22 at 16:03
  • @JoséPereda please helpp here pleasee https://stackoverflow.com/questions/72678455/gluon-position-service-ios – leksyde Jun 19 '22 at 16:14

0 Answers0