question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash because of Unsupported Type

See original GitHub issue

My code worked fine on version 0.5.0, but always crash because of Unsupported Type after upgrade to 0.5.1 or 0.6.0

Here is the crash log:

                                                                                  Process: cn.fashicon.fashicon.development, PID: 17760
                                                                                  java.lang.RuntimeException: Unable to start activity ComponentInfo{cn.fashicon.fashicon.development/cn.fashicon.fashicon.home.TabActivity}: java.lang.RuntimeException: 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
                                                                                   Caused by: java.lang.RuntimeException: 
at me.lazmaid.kraph.lang.GraphQLNode.convertToDataEntry(GraphQLNode.kt:35)
at me.lazmaid.kraph.lang.GraphQLNode.access$convertToDataEntry(GraphQLNode.kt:3)
at me.lazmaid.kraph.lang.GraphQLNode$print$1.invoke(GraphQLNode.kt:13)
at me.lazmaid.kraph.lang.GraphQLNode$print$1.invoke(GraphQLNode.kt:3)
at kotlin.text.StringsKt__StringBuilderKt.appendElement(StringBuilder.kt:59)
at kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:2023)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:2038)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:2037)
at me.lazmaid.kraph.lang.GraphQLNode.print(GraphQLNode.kt:12)
at me.lazmaid.kraph.lang.Argument.print(Argument.kt:12)
at me.lazmaid.kraph.lang.Field.print(Field.kt:17)
at me.lazmaid.kraph.lang.SelectionSet$print$fieldStr$1.invoke(SelectionSet.kt:15)
at me.lazmaid.kraph.lang.SelectionSet$print$fieldStr$1.invoke(SelectionSet.kt:7)
at kotlin.text.StringsKt__StringBuilderKt.appendElement(StringBuilder.kt:59)
at kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:2023)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:2038)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:2037)
at me.lazmaid.kraph.lang.SelectionSet.print(SelectionSet.kt:15)
at me.lazmaid.kraph.lang.Field.print(Field.kt:16)
at me.lazmaid.kraph.lang.SelectionSet$print$fieldStr$1.invoke(SelectionSet.kt:15)
at me.lazmaid.kraph.lang.SelectionSet$print$fieldStr$1.invoke(SelectionSet.kt:7)
at kotlin.text.StringsKt__StringBuilderKt.appendElement(StringBuilder.kt:59)
at kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:2023)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:2038)
at kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:2037)
at me.lazmaid.kraph.lang.SelectionSet.print(SelectionSet.kt:15)
at me.lazmaid.kraph.lang.Operation.print(Operation.kt:19)
at me.lazmaid.kraph.lang.Document.print(Document.kt:15)
at me.lazmaid.kraph.Kraph.toRequestString(Kraph.kt:42)
at cn.fashicon.fashicon.data.DataProvider.getProfileInfo(DataProvider.java:237)
at cn.fashicon.fashicon.profile.domain.usecase.GetProfileInfo.buildUseCase(GetProfileInfo.java:25)
at cn.fashicon.fashicon.profile.domain.usecase.GetProfileInfo.buildUseCase(GetProfileInfo.java:16)
at cn.fashicon.fashicon.NetworkUseCase.execute(NetworkUseCase.java:51)
at cn.fashicon.fashicon.NetworkUseCase.execute(NetworkUseCase.java:47)
at cn.fashicon.fashicon.home.TabPresenter.getMe(TabPresenter.java:190)
at cn.fashicon.fashicon.home.TabActivity.onCreate(TabActivity.java:185)
at android.app.Activity.performCreate(Activity.java:6975)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
at cn.jiguang.a.a.d.a.a.d.callActivityOnCreate(Unknown Source:24)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) 
at android.os.Handler.dispatchMessage(Handler.java:105) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6541) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) ```

And this is the query:

```       fun getProfileInfo(userId: String, myUserId: String, first: Int, after: String): Kraph {
            return Kraph {
                query {
                    fieldObject("user", args = mapOf("userId" to userId)) {
                        field("userId")
                        field("profileMediaUrl")
                        field("followingCount")
                        field("followerCount")
                        field("lookCount")
                        field("username")
                        field("userSig")
                        field("userType")
                        field("isLoggedInTencent")
                        field("followed: isFollowedBy", args = mapOf("followerId" to myUserId))
                        fieldObject("badgeInfo") {
                            fieldObject("lookLevel") {
                                field("levelKey")
                                field("nextLevelKey")
                                field("from")
                                field("to")
                            }
                            fieldObject("adviceLevel") {
                                field("levelKey")
                                field("nextLevelKey")
                                field("from")
                                field("to")
                            }
                        }
                        fieldObject("lookScoreInfo: scoreInfo", args = mapOf("by" to LeaderBoardBy.LOOKS_RATINGS, "period" to LeaderBoardPeriod.ALL_TIME)) {
                            field("score")
                        }
                        fieldObject("adviceScoreInfo: scoreInfo", args = mapOf("by" to LeaderBoardBy.ADVICE_RATINGS, "period" to LeaderBoardPeriod.ALL_TIME)) {
                            field("score")
                        }
                    }
                    fieldObject("looksPaginated", args = mapOf("userId" to userId, "first" to first, "after" to after)) {
                        fieldObject("edges") {
                            fieldObject("node") {
                                field("lookId")
                                field("userId")
                                field("title")
                                field("totalRating")
                                fieldObject("rating", args = mapOf("raterId" to myUserId)) {
                                    field("raterId")
                                    field("lookId")
                                    field("stars")
                                }
                                field("adviceCount")
                                fieldObject("lookMedias") {
                                    field("title")
                                    field("url")
                                    fieldObject("tags"){
                                        fieldObject("brand"){
                                            field("brandId")
                                            field("name")
                                        }
                                        fieldObject("category"){
                                            field("categoryId")
                                            field("name")
                                        }
                                        fieldObject("location"){
                                            field("x")
                                            field("y")
                                        }
                                    }
                                }
                            }
                        }
                        fieldObject("pageInfo") {
                            field("endCursor")
                            field("hasNextPage")
                        }
                    }
                }
            }
        }

WHich was wrong in my situation?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
VerachadWcommented, Feb 28, 2018

I did some refactoring to support data for ‘Map’ type before. Maybe that can be a problem. I will take a look how to support enum more properly in the future.

0reactions
VerachadWcommented, Nov 22, 2018

Since we just added the simple support for Enum in #25. I will close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ios - AVCaptureMetadataOutput setMetadataObjectTypes ...
i got crashes info from Crashlytics: [AVCaptureMetadataOutput setMetadataObjectTypes:] - unsupported type found. Use -availableMetadataObjectTypes. ios ...
Read more >
ARKit Demo Crashing | Apple Developer Forums
It would be crashing because of an unsupported texture pack which the app uses and it would cause it to crash meaning you...
Read more >
3 Ways to Fix Unsupported Video Format Error on iPhone/iPad
Why the Unsupported File Type on iPhone Error Occurs. Your iPhone runs out of storage space due to the big size of the...
Read more >
SQL Server Wire Protocol driver crashes when fetching ...
SQL Server Wire Protocol driver crashes when fetching unsupported GEOMETRY data type. ... The exact cause is not known at this time. ......
Read more >
D77918 [OpenMP] Avoid crash in preparation for diagnose of ...
mode if we have an expression involving unsupported types outside of a ... that we actually have current function because it does getCurFunctionDecl()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found