Cannot set property 'billingHandler' of null

My userSignupWithPassword mutation broke today with the following error:

locations: [{line: 2, column: 3}]
message: "Cannot set property 'billingHandler' of null"
path: ["userSignUpWithPassword"]

Can anyone help explain what that means? I don’t have any variables named “billingHandler”, I don’t have any fields in any table called “billingHandler”. Why would it be trying to set this anywhere?

The only thing I can think of is I do have a Create.trigger before on my User table to create a Stripe Customer & Subscription.

But I haven’t changed that code since it was working, There’s no mention of “billingHandler” in there, and lastly when I signup a user this function runs correctly, creates a Stripe Customer and subscription and ends without errors.

Does anyone know what this “billingHandler” is?

This comes back as a “GraphQL error” and a User is never created in my table.

Request headers:

:authority: api.8base.com
:method: POST
:path: /ck1y5djt0000201ldey0t1bju
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9,da;q=0.8
authorization: 
content-length: 1217
content-type: application/json
origin: https://xxx.markl.now.sh
referer: https://xxx.markl.now.sh/?signup
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4056.0 Safari/537.36

Request Payload:

{"operationName":"userSignUpWithPassword","variables":{"billingInterval":"weekly","firstName":"Mark","lastName":"Xxxx","email":"hello@xxxxx.com","password":"XXXXXXXX","stripeToken":{"id":"tok_xxxxxxxxxxx","object":"token","card":{"id":"card_xxxxxxxxxxx","object":"card","address_city":null,"address_country":null,"address_line1":null,"address_line1_check":null,"address_line2":null,"address_state":null,"address_zip":null,"address_zip_check":null,"brand":"MasterCard","country":"DK","cvc_check":"unchecked","dynamic_last4":null,"exp_month":12,"exp_year":2023,"funding":"prepaid","last4":"xxxx","metadata":{},"name":null,"tokenization_method":null},"client_ip":"xx.xxx.xxx.xxx","created":1582837985,"livemode":true,"type":"card","used":false}},"query":"mutation userSignUpWithPassword($email: String!, $billingInterval: String!, $password: String!, $firstName: String!, $lastName: String!, $stripeToken: JSON!) {\n  userSignUpWithPassword(authProfileId: \"xxxxxxxxxxx\", password: $password, user: {email: $email, billingInterval: $billingInterval, firstName: $firstName, lastName: $lastName, stripe: {create: {token: $stripeToken}}}) {\n    id\n    __typename\n  }\n}\n"}

Response headers:

access-control-allow-credentials: true
access-control-allow-headers: *
access-control-allow-origin: *
content-encoding: gzip
content-length: 148
content-type: application/json
date: Thu, 27 Feb 2020 22:05:02 GMT
status: 200
via: 1.1 f5a11ff9652a64f1fcf7e2671d944f46.cloudfront.net (CloudFront)
x-amz-apigw-id: Ik554EMeoAMFwTw=
x-amz-cf-id: Qa_QiX4Ujr1F9k6UQklw4QvkgwHgXmDGC_w4wHYNkN96FV0TgddhuA==
x-amz-cf-pop: EWR52-C4
x-amzn-requestid: 0ad9122c-9c6b-4937-ac56-03b5352cf6de
x-amzn-trace-id: Root=1-5e583d0b-e907ea80fe65f0005855ff80;Sampled=0
x-cache: Miss from cloudfront

Status Code: 200

Here’s what. my Graphql Quey looks like:

  mutation userSignUpWithPassword(
    $email: String!
    $billingInterval: String!
    $password: String!
    $firstName: String!
    $lastName: String!
    $stripeToken: JSON!
  ) {
    userSignUpWithPassword(
      authProfileId: "XXXXXXXXXX"
      password: $password
      user: {
        email: $email
        billingInterval: $billingInterval
        firstName: $firstName
        lastName: $lastName
        stripe: { create: { token: $stripeToken } }
      }
    ) {
      id
    }
  }

UPDATE:

I Completely. removed the Trigger.before for my Stripe customer creation and this STILL fails with the same error :scream:

That means it’s an issue with the userSignUpWithPassword mutation.

@MarkLyck should be fixed now

1 Like

@evgeny.semushin Thanks for fixing it so promptly! Users can sign up to my application again. Phew…