danger/kotlin

danger_out.json exited with code 768

devdhar04 opened this issue · 1 comments

I have created a Danger Plugin it was working fine till I didn't update the Kotlin version 1.5.30 , after CI is failing,
and one has idea how to fix this :

Executing $(which danger) ci --process danger-kotlin --passURLForDSL --id DangerKotlinAction - pid 1
Executing kotlinc -script-templates systems.danger.kts.DangerFileScript -cp /usr/local/lib/danger/danger-kotlin.jar -script Dangerfile.df.kts /tmp/danger-dsl.json danger_out.json - pid 28

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
	at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
	at kotlin.reflect.jvm.internal.KCallableImpl.callDefaultMethod$kotlin_reflection(KCallableImpl.kt:159)
	at kotlin.reflect.jvm.internal.KCallableImpl.callBy(KCallableImpl.kt:112)

	at jp.ne.paypay.android.danger.model.DataMapper.invoke(DataMapper.kt:68)

	at Dangerfile_df$$special$$inlined$register$14.invoke(DataMapper.kt:45)
	at jp.ne.paypay.android.danger.model.DataMapper.argFor(DataMapper.kt:40)
	at jp.ne.paypay.android.danger.model.DataMapper.invoke(DataMapper.kt:68)
	at Dangerfile_df$$special$$inlined$register$33.invoke(DataMapper.kt:45)
	at jp.ne.paypay.android.danger.model.DataMapper.argFor(DataMapper.kt:40)
	at jp.ne.paypay.android.danger.model.DataMapper.invoke(DataMapper.kt:68)
	at Dangerfile_df.<init>(Dangerfile.df.kts:173)

Uncaught Kotlin exception: kotlin.Exception: Command kotlinc -script-templates systems.danger.kts.DangerFileScript -cp /usr/local/lib/danger/danger-kotlin.jar -script Dangerfile.df.kts /tmp/danger-dsl.json danger_out.json exited with code 768

    at kfun:systems.danger.cmd.Cmd#exec(){} (0x228518)
    at kfun:systems.danger.cmd.dangerfile.DangerFile#execute(kotlin.String;kotlin.String){} (0x22915b)
    at kfun:systems.danger.DangerKotlin#run(){} (0x227408)
    at Init_and_run_start (0x22c005)
    at __libc_start_main (0x7fdbb23f6b97)
    at  (0x211029)
    at  ((nil))

Failing the build, there is 1 fail.
Request failed [403]: https://api.github.com/user
Response: {
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/reference/users#get-the-authenticated-user"
}
Request failed [403]: https://api.github.com/user
Response: {
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/reference/users#get-the-authenticated-user"
}
Feedback: https://github.com/Pay-Baymax/pay2-merchant-android/pull/549#issuecomment-927604609
Uncaught Kotlin exception: kotlin.Exception: Command $(which danger) ci --process danger-kotlin --passURLForDSL --id DangerKotlinAction exited with code 256
    at kfun:systems.danger.cmd.Cmd#exec(){} (0x228518)
    at kfun:systems.danger.cmd.dangerjs.DangerJS#process(kotlin.String;kotlin.String;kotlin.collections.List<kotlin.String>){} (0x229764)
    at Init_and_run_start (0x22c364)
    at __libc_start_main (0x7f8e56260b97)
    at  (0x211029)
    at  ((nil))

@devdhar04 let us know if this is still happening with the latest danger kotlin version using kotlin 1.7.0!