Git Product home page Git Product logo

curseproxy's People

Contributors

livingshredder avatar nikkyai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

curseproxy's Issues

Certain GraphQL queries respond with an error when issued for the first time within a certain timespan.

Issue Outline

Certain GraphQL queries respond with an error when issued for the first time within a certain timespan.

This is an issue I encountered recently, and still have relatively little information at present. I generally encounter it the first time I make a certain GraphQL request on a day, but not on the second and later attempts. (Edit: upon further inspection, this is inconsistent.)

I conducted a brief series of tests today in an effort to pin how long after the first (errored) response is received that the error starts to appear again.

  • A request made approx 1 min after the initial errored response received a successful response.
  • A request made approx 10 min after the initial errored response received an errored response.
  • A request made approx 11 min after the initial errored response (approx 1 min after previous) received an errored response.
  • A request made approx 30 min after the initial errored response (approx 20 min after previous) received a successful response.
  • A request made approx 35 min after the initial errored response (approx 5 min after previous) received a successful response.

To be fair, I'm not 100% certain that the issue is related to the amount of time between requests, but, in my experience, the error happens much more often the first time I make a request in a day. (Although this could be sample size, as I first noticed the issue about a week ago.)

Steps to reproduce

This isn't incredibly specific at the moment. I can try to narrow it down a bit more if necessary, but it's a strange process because I'm not 100% certain of the time interval I need to wait to be sure that the conditions needed for the error to occur are met (if it's even actually related to the time between requests).

My Request

My GraphQL request was sent as a POST request to https://curse.nikky.moe/graphql with these headers...
'Content-Type': 'application/json', 'Accept': 'application/json'
...and with this as the contents.

{
  addons(gameId: 432, category: "Fabric") {
    id
    name
    slug
    summary
    categories {
      categoryId
      name
    }
    authors {
      id
      name
      url
    }
    dateReleased
    dateModified
    downloadCount
    files {
      displayName
      gameVersion
    }
  }
}

Errored response

The error that occurs for the first request made within a certain time interval. (Reformatted a bit for readability)

{
  "exception" : "kotlin.KotlinNullPointerException",
  "message" : "",
  "stacktrace" : [
    "kotlin.KotlinNullPointerException", 
      "\tat moe.nikky.curseproxy.graphql.AppSchema$schema$1$6$2$1.invokeSuspend(AppSchema.kt:161)", 
      "\tat \b\b\b(Coroutine boundary.\b(\b)", 
      "\tat com.apurebase.kgraphql.ExtensionsKt$toMapAsync$2.invokeSuspend(Extensions.kt:56)", 
      "\tat com.apurebase.kgraphql.schema.execution.ParallelRequestExecutor.createNode(ParallelRequestExecutor.kt:125)", 
      "\tat com.apurebase.kgraphql.schema.execution.ParallelRequestExecutor.writeOperation(ParallelRequestExecutor.kt:86)", 
      "\tat com.apurebase.kgraphql.schema.execution.ParallelRequestExecutor$suspendExecute$2$resultMap$1.invokeSuspend(ParallelRequestExecutor.kt:59)", 
      "\tat com.apurebase.kgraphql.ExtensionsKt$toMapAsync$2.invokeSuspend(Extensions.kt:56)", 
      "\tat com.apurebase.kgraphql.schema.execution.ParallelRequestExecutor$suspendExecute$2.invokeSuspend(ParallelRequestExecutor.kt:53)", 
      "\tat com.apurebase.kgraphql.schema.execution.ParallelRequestExecutor.suspendExecute(ParallelRequestExecutor.kt:49)", 
      "\tat com.apurebase.kgraphql.schema.DefaultSchema$execute$2.invokeSuspend(DefaultSchema.kt:53)", 
      "\tat moe.nikky.curseproxy.GraphQLRoutesKt$graphql$1$1.invokeSuspend(GraphQLRoutes.kt:39)", 
      "\tat io.ktor.routing.Routing.executeResult(Routing.kt:147)", 
      "\tat io.ktor.routing.Routing.interceptor(Routing.kt:34)", 
      "\tat io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:99)", 
      "\tat io.ktor.features.ContentNegotiation$Feature$install$1.invokeSuspend(ContentNegotiation.kt:107)", 
      "\tat io.ktor.features.StatusPages$interceptCall$2.invokeSuspend(StatusPages.kt:101)", 
      "\tat io.ktor.features.StatusPages.interceptCall(StatusPages.kt:100)", 
      "\tat io.ktor.features.StatusPages$Feature$install$2.invokeSuspend(StatusPages.kt:140)", 
      "\tat io.ktor.features.CallLogging$Feature$install$1$invokeSuspend$$inlined$withMDC$1.invokeSuspend(CallLogging.kt:226)", 
      "\tat io.ktor.features.CallLogging$Feature$install$1.invokeSuspend(CallLogging.kt:230)", 
      "\tat io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:120)", 
      "\tat io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invokeSuspend(NettyApplicationCallHandler.kt:40)",
    "Caused by: kotlin.KotlinNullPointerException", 
      "\tat moe.nikky.curseproxy.graphql.AppSchema$schema$1$6$2$1.invokeSuspend(AppSchema.kt:161)", 
      "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)", 
      "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)", 
      "\tat kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)", 
      "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)", 
      "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)", 
      "\tat kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)", "" ]
}

Successful response

As far as I can tell, the response to a request made shortly after the initial errored response is completely successful and returns the expected data. You can view one of these successful responses at this link (it's big (2.8 MB)).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.