Cannot Use fdk run

I’m trying to test an app I’m developing with fdk run. I have domain/a/tickets/ticketnumber&dev=true open.

When I try fdk run and then refresh the ticket page, the error beginning “TypeError” below occurs.

This was happening on node 12.22.6/fdk 6.13.2, so I updated to the latest version, and am seeing the same error.

➜  linked-tickets git:(master) ✗ node -v 
➜  linked-tickets git:(master) ✗ fdk --version 
Installed: 8.2.0
Already Up to Date..!
➜  linked-tickets git:(master) ✗ npm cache clean --force 
npm WARN using --force I sure hope you know what you are doing.
➜  linked-tickets git:(master) ✗ fdk run 
Installing dependencies...
+ base-64@0.1.0
+ got@11.1.0
updated 2 packages and audited 56 packages in 2.102s
6 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
Starting local testing server at http://*:10001/    
Append 'dev=true' to your Freshdesk account URL to start testing    
Quit the server with Control-C.
To simulate product, app setup, and external events, visit - http://localhost:10001/web/test
Populating test data with events found in the app
To test the installation page, visit - http://localhost:10001/custom_configs
TypeError: Cannot read property 'location' of undefined
    at addScopeToURLs (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/lib/routes/iframe.js:95:55)
    at iframeAPIHandler (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/lib/routes/iframe.js:113:14)
    at Layer.handle [as handle_request] (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/layer.js:95:5)
    at /home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:341:12)
    at next (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:275:10)
    at Function.handle (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:174:3)
    at router (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:47:12)
    at Layer.handle [as handle_request] (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:323:13)
    at /home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:341:12)
    at (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:275:10)
    at Immediate.<anonymous> (/home/jamie/.nvm/versions/node/v14.19.2/lib/node_modules/fdk/node_modules/express/lib/router/index.js:641:15)
    at processImmediate (internal/timers.js:466:21)
1 Like

Hi @Jamie, I have encountered this error before when I tested my app with the wrong product. I am not sure if that is the same case with you. Can you share the contents of the manifest.json file for the app under test? And, let us know what product you are testing it in?

1 Like

This isn’t a new app - fdk run was working fine a few weeks ago!


I’m getting same error. I have existing app that I was updating and saw this error and also I see the error on a brand new app I created with fdk create. I tried to delete the .fdk dir in home as suggested on another post but this did not address the error.

This happens when I connect the CRM to the test app using ?dev=true.

I see other recent posts on this topic. This appears to be a problem with FDK.

note: I have not noticed any negative behavior in my app so I think this can be ignored but its rather annoying.

Thanks for the updates @Jamie and @stevemc. I am trying to get our engineering team to look into this. cc @Aravind_Dasarathy

I had a call with a Freshworks engineer today. This issue was acknowledged as a fdk bug. I think he’s going to update this thread with more info soon about when a fix will be released.

@stevemc it works on my sandbox instance - that may be a temporary solution for you as well?

@Jamie , thanks for the info. That helps.