opencollective / opencollective-website

OpenCollective frontend
MIT License
62 stars 38 forks source link

[bug] Cannot create a new collective #772

Closed mojoaxel closed 7 years ago

mojoaxel commented 7 years ago

The registration process fails in step 3/3 on the "Create!" button:

action @ 19:06:21.079 CREATE_GROUP_FROM_GITHUB_REPO_FAILURE

POST https://opencollective.com/api/groups returns error 500:

{  
   "error":{  
      "name":"SequelizeDatabaseError",
      "parent":{  
         "name":"error",
         "length":472,
         "severity":"ERROR",
         "code":"23502",
         "detail":"Failing row contains (9176, null, null, USD, 2017-10-16 17:06:20.982+00, 2017-10-16 17:06:20.982+00, null, t, null, https://images.githubusercontent.com/macleodbroad-wf, macleodbroad-wf, null, null, null, null, 5, null, {\"UserId\":8327}, null, f, null, 8327, null, null, USER, null, null, null, null, null, null, null, null).",
         "schema":"public",
         "table":"Collectives",
         "column":"name",
         "file":"execMain.c",
         "line":"1732",
         "routine":"ExecConstraints",
         "sql":"INSERT INTO \"Collectives\" (\"id\",\"type\",\"slug\",\"name\",\"CreatedByUserId\",\"hostFeePercent\",\"currency\",\"image\",\"data\",\"createdAt\",\"updatedAt\",\"isActive\",\"isSupercollective\") VALUES (DEFAULT,'USER','macleodbroad-wf',NULL,8327,5,'USD','https://images.githubusercontent.com/macleodbroad-wf','{\"UserId\":8327}','2017-10-16 17:06:20.982 +00:00','2017-10-16 17:06:20.982 +00:00',true,false) RETURNING *;"
      },
      "original":{  
         "name":"error",
         "length":472,
         "severity":"ERROR",
         "code":"23502",
         "detail":"Failing row contains (9176, null, null, USD, 2017-10-16 17:06:20.982+00, 2017-10-16 17:06:20.982+00, null, t, null, https://images.githubusercontent.com/macleodbroad-wf, macleodbroad-wf, null, null, null, null, 5, null, {\"UserId\":8327}, null, f, null, 8327, null, null, USER, null, null, null, null, null, null, null, null).",
         "schema":"public",
         "table":"Collectives",
         "column":"name",
         "file":"execMain.c",
         "line":"1732",
         "routine":"ExecConstraints",
         "sql":"INSERT INTO \"Collectives\" (\"id\",\"type\",\"slug\",\"name\",\"CreatedByUserId\",\"hostFeePercent\",\"currency\",\"image\",\"data\",\"createdAt\",\"updatedAt\",\"isActive\",\"isSupercollective\") VALUES (DEFAULT,'USER','macleodbroad-wf',NULL,8327,5,'USD','https://images.githubusercontent.com/macleodbroad-wf','{\"UserId\":8327}','2017-10-16 17:06:20.982 +00:00','2017-10-16 17:06:20.982 +00:00',true,false) RETURNING *;"
      },
      "sql":"INSERT INTO \"Collectives\" (\"id\",\"type\",\"slug\",\"name\",\"CreatedByUserId\",\"hostFeePercent\",\"currency\",\"image\",\"data\",\"createdAt\",\"updatedAt\",\"isActive\",\"isSupercollective\") VALUES (DEFAULT,'USER','macleodbroad-wf',NULL,8327,5,'USD','https://images.githubusercontent.com/macleodbroad-wf','{\"UserId\":8327}','2017-10-16 17:06:20.982 +00:00','2017-10-16 17:06:20.982 +00:00',true,false) RETURNING *;",
      "code":500
   }
}
piamancini commented 7 years ago

thanks @mojoaxel we'll look into it. cc / @asood123

asood123 commented 7 years ago

@mojoaxel What repo did you try to connect this with? As you can probably tell from the error, each collective in our db requires a name, which we normally pull from the repo but in this case, it's not finding it for some reason.

mojoaxel commented 7 years ago

What repo did you try to connect this with?

https://github.com/almende/vis

mojoaxel commented 7 years ago

@asood123 Maybe the problem is, that I'm not an "owner" of the almende account but only an "member"!? I'm currently community manager and a maintainer of vis.js and have the written authorisation from the project owner (the almende company) to bring the vis repository to OpenCollective.

asood123 commented 7 years ago

Nah, I think the problem is on our end (we recently released v2 and still dealing with bugs). Give us a few days to fix and release a new version. I'll ping this thread when we are ready for you to try again.

mojoaxel commented 7 years ago

I just noticed the following collectives connected with my account. Can somebody please clean up that mess, before somebody starts donating:

thx!

mojoaxel commented 7 years ago

@asood123 Can I start using this collective https://opencollective.com/vis or do I still need to wait for you to give me a GO for creating a new one?

piamancini commented 7 years ago

Hey @mojoaxel just cleaned them up for you and your collective is active. Sorry you hit that bug. We pushed a fix for it already

piamancini commented 7 years ago

@asood123 PR to readme is still needed

mojoaxel commented 7 years ago

@piamancini Yeah! Looks like this is fixed now! 🎉 Can you please remove the following "ghost" collectives:

I'll start with a clean one. Thanks!

mojoaxel commented 7 years ago

@piamancini @asood123 My user profile now works again. Thanks!

Sadly there is still an error in create step 3/3:

groups Failed to load resource: the server responded with a status of 500 ()
bundle-7d2309e7d5c4404a5a2fc21ee330e4e2.js:42  action @ 14:15:26.781 CREATE_GROUP_FROM_GITHUB_REPO_FAILURE 
bundle-7d2309e7d5c4404a5a2fc21ee330e4e2.js:42  prev state {form: {…}, github: {…}, groups: {…}, notification: {…}, images: {…}, …}app: {rendered: true}rendered: true__proto__: Objectcollectives: {}connectedAccounts: {}discover: {}donations: {}expenses: {approveInProgress: {…}, rejectInProgress: {…}, payInProgress: {…}}form: {profile: {…}, donation: {…}, expense: {…}, schema: {…}, github: {…}, …}github: {connectedAccount: {…}, user: {…}, repositories: Array(3), contributors: Array(25)}groups: {}homepage: {}images: {isUploading: false}notification: {}router: {routes: Array(2), params: {…}, location: {…}, components: Array(2)}session: {user: {…}, isAuthenticated: true}subscriptions: {list: Array(0)}transactions: {donations: Array(0), expenses: Array(0)}users: {updateInProgress: false, sendingEmailInProgress: false, connectPaypalInProgress: false, connectStripeInProgress: false}__proto__: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
bundle-7d2309e7d5c4404a5a2fc21ee330e4e2.js:42  action {type: "CREATE_GROUP_FROM_GITHUB_REPO_FAILURE", error: Error
    at https://opencollective.com/public/js/bundle-7d2309e7d5c4404a5a2fc21ee330e4e2.js:13:3200…}error: Error
    at https://opencollective.com/public/js/bundle-7d2309e7d5c4404a5a2fc21ee330e4e2.js:13:32002
    at <anonymous>json: error: code: 500__proto__: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()__proto__: Objectresponse: Responsebody: (...)bodyUsed: trueheaders: Headers {}__proto__: Headersappend: ƒ append()delete: ƒ delete()entries: ƒ entries()forEach: ƒ forEach()get: ƒ get()has: ƒ has()keys: ƒ keys()set: ƒ set()values: ƒ values()constructor: ƒ Headers()Symbol(Symbol.iterator): ƒ entries()Symbol(Symbol.toStringTag): "Headers"__proto__: Objectok: falseredirected: falsestatus: 500statusText: ""type: "basic"url: "https://opencollective.com/api/groups"__proto__: Responsestack: "Error↵    at https://opencollective.com/public/js/bundle-7d2309e7d5c4404a5a2fc21ee330e4e2.js:13:32002↵    at <anonymous>"__proto__: Objecttype: "CREATE_GROUP_FROM_GITHUB_REPO_FAILURE"__proto__: Object
bundle-7d2309e7d5c4404a5a2fc21ee330e4e2.js:42  next state {form: {…}, github: {…}, groups: {…}, notification: {…}, images: {…}, …}app: {rendered: true}collectives: {}connectedAccounts: {}discover: {}donations: {}__proto__: Objectexpenses: approveInProgress: {}payInProgress: {}rejectInProgress: {}__proto__: Object__proto__: Objectform: addFunds: attributes: description: ""email: nullfundsFromHost: truename: nullprivateMessage: ""totalAmount: 0__proto__: Objecterror: {}inProgress: false__proto__: Objectaddgroup: {attributes: {…}}attributes: users: Array(1)0: __proto__: Objectlength: 1__proto__: Array(0)__proto__: Object__proto__: Objectdonation: {}editCollective: attributes: {}inProgress: false__proto__: ObjecteditGroup: attributes: {}inProgress: false__proto__: Objectexpense: attributes: category: ""description: ""incurredAt: "2017-10-26T02:22:20.372Z"payoutMethod: "paypal"vat: null__proto__: Objecterror: {}inProgress: false__proto__: Objectgithub: attributes: contributors: (5) ["yotamberk", "mojoaxel", "wimrijnders", "macleodbroad-wf", "ludost"]0: "yotamberk"1: "mojoaxel"2: "wimrijnders"3: "macleodbroad-wf"4: "ludost"length: 5__proto__: Array(0)description: "Vis.js is designed to be easy to use, to handle large amounts of dynamic data, and to enable manipulation of and interaction with the data. The library consists of the components DataSet, Timeline, Network, Graph2d and Graph3d"logo: "https://opencollective-production.s3-us-west-1.amazonaws.com/1f4a8030-ba47-11e7-a545-6dcd8fd564a8.png"mission: "We are on a mission to develop and maintain a sophisticated visualisation library"repository: "vis"tags: "canvas, canvas-animation, canvasjs, chart, chart-library, charting-library, chartjs, charts, data-visualization, data-viz, dataset, dataview, graphics, graphs, javascript, network, network-visualization, timeline, visualization, visualization-library, open source"token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6ImNvbm5lY3RlZC1hY2NvdW50IiwiY29ubmVjdGVkQWNjb3VudElkIjoxNTcxLCJ1c2VybmFtZSI6Im1vam9heGVsIiwiaWQiOjE1NzIsImVtYWlsIjoiYWxleEB3dW5zY2hpay5uZXQiLCJpYXQiOjE1MDkwMTk5ODgsImV4cCI6MTUwOTEwNjM4OCwiaXNzIjoiaHR0cHM6Ly9hcGkub3BlbmNvbGxlY3RpdmUuY29tIiwic3ViIjoxNTcyfQ.v3UvyTngb-32UO7NMiGQ2LWaegJ8YiDtmDS6gCZ6XKE"username: "almende"__proto__: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()__proto__: Objectprofile: attributes: {}error: {}__proto__: ObjectisEditMode: false__proto__: Objectschema: error: {}__proto__: Objecttwitter: attributes: {}error: {}__proto__: Object__proto__: Objectgithub: connectedAccount: {username: "mojoaxel", id: 1571}contributors: Array(25)0: {name: "josdejong", avatar: "https://avatars1.githubusercontent.com/u/568626?v=4", contributions: 1247}1: {name: "AlexDM0", avatar: "https://avatars2.githubusercontent.com/u/5363277?v=4", contributions: 922}2: {name: "hansmaulwurf23", avatar: "https://avatars1.githubusercontent.com/u/1116456?v=4", contributions: 20}3: {name: "bradh", avatar: "https://avatars2.githubusercontent.com/u/174642?v=4", contributions: 18}4: {name: "cdjackson", avatar: "https://avatars2.githubusercontent.com/u/1041475?v=4", contributions: 18}5: {name: "brendon1982", avatar: "https://avatars0.githubusercontent.com/u/1317688?v=4", contributions: 15}6: {name: "Gillingham", avatar: "https://avatars1.githubusercontent.com/u/385396?v=4", contributions: 13}7: {name: "Tooa", avatar: "https://avatars0.githubusercontent.com/u/5375334?v=4", contributions: 13}8: {name: "ckane", avatar: "https://avatars3.githubusercontent.com/u/3454769?v=4", contributions: 10}9: {name: "eymiha", avatar: "https://avatars0.githubusercontent.com/u/27648?v=4", contributions: 8}10: {name: "dturkenk", avatar: "https://avatars1.githubusercontent.com/u/477923?v=4", contributions: 7}11: {name: "lewisjb", avatar: "https://avatars1.githubusercontent.com/u/17665267?v=4", contributions: 7}12: {name: "felixhayashi", avatar: "https://avatars1.githubusercontent.com/u/4307137?v=4", contributions: 6}13: {name: "Dude9177", avatar: "https://avatars2.githubusercontent.com/u/1327161?v=4", contributions: 6}14: {name: "BTMorton", avatar: "https://avatars3.githubusercontent.com/u/9026309?v=4", contributions: 5}15: {name: "mdouailin", avatar: "https://avatars0.githubusercontent.com/u/8004280?v=4", contributions: 5}16: {name: "simo9000", avatar: "https://avatars2.githubusercontent.com/u/3857700?v=4", contributions: 5}17: {name: "ZacBrownBand", avatar: "https://avatars0.githubusercontent.com/u/10978390?v=4", contributions: 5}18: {name: "CapitanMorgan", avatar: "https://avatars0.githubusercontent.com/u/16598357?v=4", contributions: 4}19: {name: "Areson", avatar: "https://avatars2.githubusercontent.com/u/1489856?v=4", contributions: 4}20: {name: "kannonboy", avatar: "https://avatars1.githubusercontent.com/u/380545?v=4", contributions: 4}21: {name: "justinharrell", avatar: "https://avatars2.githubusercontent.com/u/1933008?v=4", contributions: 4}22: {name: "Stexxen", avatar: "https://avatars3.githubusercontent.com/u/4494301?v=4", contributions: 4}23: {name: "ponml", avatar: "https://avatars2.githubusercontent.com/u/10541992?v=4", contributions: 3}24: {name: "grahamj", avatar: "https://avatars3.githubusercontent.com/u/1738721?v=4", contributions: 3}length: 25__proto__: Array(0)repositories: Array(3)0: {title: "vis", fullName: "almende/vis", description: "vis.js is a dynamic, browser-based visualization library", stars: 5789, owner: "almende", …}1: {title: "grunt-bump", fullName: "vojtajina/grunt-bump", description: "Grunt.js plugin - Increment package version.", stars: 641, owner: "vojtajina", …}2: {title: "angular-visjs", fullName: "visjs/angular-visjs", description: "AngularJS directive module for VisJS components.", stars: 102, owner: "visjs", …}length: 3__proto__: Array(0)user: {id: 600565, login: "mojoaxel", name: "Alexander Wunschik", email: null, blog: "www.wunschik.it"}__proto__: Objectgroups: {}homepage: {}images: {isUploading: false}isUploading: false__proto__: Objectnotification: {}__proto__: Objectrouter: components: (2) [undefined, ƒ]0: undefined1: ƒ s(e,t)WrappedComponent: ƒ t(e)contextTypes: {store: ƒ}displayName: "Connect(t)"propTypes: {store: ƒ}arguments: (...)caller: (...)length: 2name: "s"prototype: r {shouldComponentUpdate: ƒ, computeStateProps: ƒ, configureFinalMapState: ƒ, computeDispatchProps: ƒ, configureFinalMapDispatch: ƒ, …}__proto__: ƒ r(e,t,n)[[FunctionLocation]]: <unknown>[[Scopes]]: Scopes[5]length: 2__proto__: Array(0)location: $searchBase: {search: "", searchBase: ""}action: "POP"hash: ""key: "3gg2ox"pathname: "/opensource/apply/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6ImNvbm5lY3RlZC1hY2NvdW50IiwiY29ubmVjdGVkQWNjb3VudElkIjoxNTcxLCJ1c2VybmFtZSI6Im1vam9heGVsIiwiaWQiOjE1NzIsImVtYWlsIjoiYWxleEB3dW5zY2hpay5uZXQiLCJpYXQiOjE1MDkwMTk5ODgsImV4cCI6MTUwOTEwNjM4OCwiaXNzIjoiaHR0cHM6Ly9hcGkub3BlbmNvbGxlY3RpdmUuY29tIiwic3ViIjoxNTcyfQ.v3UvyTngb-32UO7NMiGQ2LWaegJ8YiDtmDS6gCZ6XKE"query: {}search: ""state: null__proto__: Objectparams: token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY29wZSI6ImNvbm5lY3RlZC1hY2NvdW50IiwiY29ubmVjdGVkQWNjb3VudElkIjoxNTcxLCJ1c2VybmFtZSI6Im1vam9heGVsIiwiaWQiOjE1NzIsImVtYWlsIjoiYWxleEB3dW5zY2hpay5uZXQiLCJpYXQiOjE1MDkwMTk5ODgsImV4cCI6MTUwOTEwNjM4OCwiaXNzIjoiaHR0cHM6Ly9hcGkub3BlbmNvbGxlY3RpdmUuY29tIiwic3ViIjoxNTcyfQ.v3UvyTngb-32UO7NMiGQ2LWaegJ8YiDtmDS6gCZ6XKE"__proto__: Objectroutes: Array(2)0: {childRoutes: Array(36)}childRoutes: (36) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]__proto__: Object1: component: ƒ s(e,t)path: "/opensource/apply/:token"__proto__: Objectlength: 2__proto__: Array(0)__proto__: Objectsession: isAuthenticated: trueuser: {scope: "login", id: 1572, email: "alex@wunschik.net", iat: 1508357310, exp: 1510949310, …}email: "alex@wunschik.net"exp: 1510949310iat: 1508357310id: 1572iss: "https://api.opencollective.com"scope: "login"sub: 1572__proto__: Object__proto__: Objectsubscriptions: {list: Array(0)}transactions: donations: []expenses: []length: 0__proto__: Array(0)__proto__: Objectusers: connectPaypalInProgress: falseconnectStripeInProgress: falsesendingEmailInProgress: falseupdateInProgress: false__proto__: Object__proto__: Object

Despide of that error a new collection "vis" was created and I'm planning of using if from now on.