Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Function Error: ResourceNotFoundException #559

Open
MarkLyck opened this issue Sep 28, 2018 · 0 comments
Open

Function Error: ResourceNotFoundException #559

MarkLyck opened this issue Sep 28, 2018 · 0 comments
Labels

Comments

@MarkLyck
Copy link

MarkLyck commented Sep 28, 2018

Current behavior
When my subscription function is run, I get the following error:

{ "error": "Function invocation failed with: software.amazon.awssdk.services.lambda.model.ResourceNotFoundException: Function not found: arn:aws:lambda:us-west-2:245881561187:function:cj5p24f2bblwp0122hin6ek1u-cjmlkha6c001j01rw51mavxf2 (Service: null; Status Code: 404; Error Code: ResourceNotFoundException; Request ID: 5d0f75fc-c2df-11e8-a079-638320583136)" }

Reproduction

Create a Subscription function with the following minimal reproducible code:

'use latest'
const { fromEvent } = require('graphcool-lib')

module.exports = function(event) {
  const api = fromEvent(event).api('simple/v1')
  return { data: event.data }
}

Subscription query:

subscription {
  Plan(filter: {
    mutation_in: [UPDATED]
  }) {
    node {
      suggestions
      portfolio
    }
  }
}

and trigger the subscription with a "Plan" mutation.

Expected behavior?
fromEvent should work, and it shouldn't throw an error.

Possibly related
#546 however, in his ticket he said that renaming the function would fix it. Which it doesn't for me.

What I've tried to solve it
I have tried to rename the function, delete it, create a new one, remove all the code except for just the bare minimum to have the fromEvent api and nothing has worked.

I have no other subscriptions subscribed to this plan, no other functions running at this time. I'm only triggering it once then going to check. There's no traffic to this service right

EDIT:

So I created another new one (I already did this once). So I now have 3 functions which all can reproduce the same error.

  1. with all the code which used to work.
  2. with minimum reproducible code (like above)
  3. with exactly the same code as Terminal command graphcool-framework not found #2.

So when I created #3 and turned the other ones off and ran it, it worked (the first time).
I then added one more line of code to #3 (using lodash) and it broke w/ the same error.
I then removed that line of code again (so it's exactly what it was 1 minute ago where it worked) but it STILL got the same error...

I then turned #3 off, turned #2 back on and ran #2.
and it worked! #2 was breaking before, but after turning it off and on it worked (the first time).
Then I added a line of code to #2 (just a console log to check if it had to do with my lodash function). aaaaand it broke again with the same error.
Removed the line I just added and just like the other function, it continues to be broken.

I then turned #2 off and turned #3 back on (still with the added line from the minimal reproducible function).
and now #3 worked again O.o...

Soo after some testing it seems that the functions break if I make ANY changes to them whatsoever and they continue to be broken until I turn them off, and turn them back on. (or create a new one)

I haven't tested over hours and hours to check if they continue to work yet. But this seems to be a consistent reproducible behavior.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants