Canvas TM1Web not working with CAM

Hi Paul

I have canvas application which calls a TM1Web Application as below:

html

This is working using TM1 Authentication.
I have now changed this to use CAM authentication and am getting errors.

CrossDomainAccesssList is set to “*”
LegacyUrlApiSessionDiscoveryEnabled is “false” (and I have also tried “False”)

I have added “camNamespaces”:[“CAM_AD”], to my instancs.json

I have restarted the Cubewise Application Server and the IBM Cognos TM1 Application Server after each change.

I can log into TM1Web and look at this report using CAM if I don’t go through Canvas.

Do you have any ideas?

Is there any configuration steps I’ve missed?

Thanks
Mal

1 Like

Hi @mmacdonnell,

Can you help provide the following:

  • Canvas version
  • TM1 version

Then, any error in the browser console?


Paul

Hi Paul,

Canvas 2.0.7
TM1 10.2.2 FP7

I get that message 3 times whenever I try to refresh

Hi @mmacdonnell,

While the Network tab is open, could you logout, then log back in again, and check if there is any error on the console aside from the above?


Paul

Hi Paul,

The following six errors occur after refreshing the screen, but before the login screen appears.
Some are duplicate messages so follow the red lines

Thanks
Mal

Hi @mmacdonnell,

That is alright. What I would like to know is if there is any error after login. Because this is where the token needed from tm1web is processed.

The no token found could mean a few things. But it could also be that tm1web is not giving the token we need for the Canvas directive to work - hence that No token found error.

Can you try to login, and see if there is any error in the console? And since you have the network tab open, can you try to look for a request that is being sent into tm1web and check what is the response?


Paul

Hi Paul,

This is the console after login:

The Network tab shows the following.
The first Preview/Response pair happen once
The next pair repeat 3 times and the next pair also repeat 3 times

Cheers
Mal

Hi @mmacdonnell,

That usually happens when the tm1web returned a “null” on the token (as opposed to nothing at all).

When did you make your changes into the tm1web configuration file? Did you try to restart the tm1web services?

Had just retried it and it is working fine on the samples application with CAM.

Can you see a tm1web request in the Network tab (after logging in)? What is the actual response?


Paul

Hi Paul,

Yes I can see a web login after the errors I sent previously and it is returning a null.

All the login details are correct (including the password).

I have restarted the TM1Web service and the Canvas service a number of times as well as the Cognos BI or CAM service

Thanks
Mal

Hi @mmacdonnell,

Can you please contact your Cubewise Local office so they can help create and submit a ticket to support for this.

Then on that request, can you include the HAR file via the Network tab of Chrome:


Paul

Hi Paul,
Hi Mal,

may I ask if there was finally any solution for that issue? I’m faced with the same situation and think my configuration settings are correct. Also Canvas 2.0.7 and TM1 10.2.2.7, using CAM security.

However, I think it’s not a problem of CAM security, because I have the same issue with the sample page in the Canvas Samples library where you can just login with “admin” user and TM1 security, i.e. no CAM.

Thanks a lot,
Andreas

Hi @andreas.franke,

It might be a different issue.

Before logging in, open up your browser console first. There might be other errors after logging in.

What are the errors that you are seeing in the console?


Paul

Hi Paul,

please see the screenshots below. These are all errors I see in the Canvas Sample (before res. after logging in as ADMIN user with just TM1 security).

I access Canvas (and everything around TM1 in general) using the FQDN:
http://FQDN:8080/samples/#/sample/component/tm1web
TM1Web standalone can be reached without problems via http://:9510/tm1web.

I have the following console output before the login prompt:
image
Then the login prompt comes up, and I enter “admin”. The following errors come up after logging in:

The full text of the last error message is:
Possibly unhandled rejection: {“data”:null,“status”:-1,“config”:{“method”:“POST”,“transformResponse”:[null],“jsonpCallbackParam”:“callback”,“url”:“http://localhost:9510/tm1web/dwrx/jsonp/TM1Service/login",“headers”:{“Content-Type”:“application/x-www-form-urlencoded”,“Accept”:"application/json, text/plain, /”},“data”:{“param0”:“”,“param1”:“Canvas Sample”,“param2”:“admin”,“param3”:“”},“withCredentials”:true},“statusText”:“”}

I’m wondering why the callback url in that message contains the “localhost” instead of my FQDN.

This is my instances.json:

 [
  {
    "name":"pnf",
    "restUri":"https://<FQDN>:3356",
    "tm1WebUri":"http://<FQDN>::9510/tm1web",
    "applyParenthesisFormatting":true,
    "chartColorScheme":["#FB6900", "#F63700", "#004853", "#007E80", "#00B9BD"],
    "clientCAMURI":"http://<FQDN>:/ibmcognos/cgi-bin/cognos.cgi",
    "camNamespaces":["<ADServer>"],
    "useSSOWithCAM":true
  }
]

When I access the same sample page directly from the server via http://localhost/…, I just get the following message in the Console:
image

Any idea? Anything I could try or test?

Thanks,
Andreas

Hi @andreas.franke,

Can you try to login manually - set the useSSOWithCAM to false (or remove this property).

What you will get is a prompt. There you will need to login with the account you are using with CAM.

Are you able to login via this method?

If so, check the camNamespaces. That should be the CAM Namespace as configured in your IBM Cognos Configuration. Can you post a screenshot of where you get this value?


Paul

Hi all,
may I ask if there was finally any solution for that issue? I have the same situation using Canvas 3.01 and TM1 10.2.2 FP7. I get the following errors:

while, this is the preview tab (three times the same error):

the tm1web.html request return statur 200 OK:

this is the code of the tm1web.html page :

Unfortunatly, I was not able to get a solution to this… I can provide the intances.json file, tm1web_config.xml file and .har file form the console if needed… (I do not see any option to attach files here)

Thanks,
Marco

Hi @mmastrolonardo,

Can you help create a ticket for this? Then please do attach the tm1web_config.xml, instances.json, har file and this post from there.

Thanks!


Paul