kromitgmbh / titra

titra - modern open source project time tracking for freelancers and small teams
https://titra.io
GNU Affero General Public License v3.0
406 stars 55 forks source link

Error when trying to add team member, and you do not have access #207

Closed AndreasBomholtz closed 8 months ago

AndreasBomholtz commented 8 months ago

When I try to add a new team member to a project I get this error message:

Exception in delivering result of invoking 'addTeamMember': TypeError: e.split is not a function
    at d (2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:204:81740)
    at eval (projectAccessRights.js:1:4787)
    at n._callback (2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:1:8881)
    at n._maybeInvokeCallback (2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:108:2313)
    at n.receiveResult (2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:108:2627)
    at E._livedata_result (2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:108:19679)
    at E.onMessage (2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:108:22004)
    at 2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:106:2695
    at Array.forEach (<anonymous>)
    at c.forEachCallback (2bf5f422029dee3153a7621948b4cb10a9084201.js?meteor_js_resource=true:106:3767)

And the line that triggers the error is this:

const t = e.split(".");

called from

e ? c(r(e.error)) : (t.$("#newmembermail").val(""),

faburem commented 8 months ago

Hello and thanks for reaching out! Can you please describe the scenario a bit more so I can reproduce the issue on my side? Based on the code involved I assume an unexpected and unhandled error is thrown on the server side - any chance you can also check the server side logs and provide the corresponding error here?

Thanks, Fabian

AndreasBomholtz commented 8 months ago

Sorry for the delay @faburem . Here is the output from the backend.

Exception while invoking method 'addTeamMember' TypeError: Cannot read property 'indexOf' of undefined
    at imports/api/projects/server/methods.js:362:33
    at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
    at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
    at getCurrentMethodInvocationResult (packages/ddp-server/livedata_server.js:817:32)
    at packages/meteor.js:365:18
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1389:31)
    at packages/ddp-server/livedata_server.js:827:46
    at new Promise (<anonymous>)
    at Session.method (packages/ddp-server/livedata_server.js:775:23)
    at packages/ddp-server/livedata_server.js:639:43
[ERROR: Exception in delivering result of invoking 'addTeamMember': @ Fri Mar 15 2024 11:05:06 GMT+0000 (Coordinated Universal Time)] { 
  "browserInfo": { 
    "browser": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36", 
    "userId": "pZ3pD7LNLzH7P6BYM", 
    "url": "https://******/edit/project/W6TZoaayQCmRjF226", 
    "resolution": "1920x1080" 
  }, 
  "stack": {} 
faburem commented 8 months ago

got it, thanks! will be fixed in the next version!

faburem commented 8 months ago

Should be fixed in titra version 0.97.1!

faburem commented 8 months ago

Closing due to inactivity. Please check in version 0.97.1+ and re-open if needed!