team-moeller / better-access-charts

Better charts for Access with chart.js
MIT License
38 stars 14 forks source link

Error 'Chart' is undifined #120

Closed clm66 closed 1 year ago

clm66 commented 1 year ago

Hi, many thanks for your incredible work! I've implemented successfully a better access chart in my project :-)

But it works not on all mashines. On some mashines I get the error: 'Chart' is undefined, see screenshot. Do you have any Idea what the reason could be?

Many thanks, Claus

better_error

clm66 commented 1 year ago

After reading your hints to a similar issue I found out, that this curl command in power shell on the charts.js gives an error, see below. getting through the initial launch dialog of IE as described here: https://stackoverflow.com/questions/38005341/the-response-content-cannot-be-parsed-because-the-internet-explorer-engine-is-no also didn't help. Any ideas what I could do here?


**_Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users...> curl https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.4/Chart.min.js

curl : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. At line:1 char:1

KDGundermann commented 1 year ago

Hi clm,

is this the Demo application? In the demo application we are using the download from a CDN by default Are you able to download it from a browser on this machines? Maybe something (Webproxy, Firewall, Virus Scan) is blocking access to this download ?

clm66 commented 1 year ago

Hi, no it's not the demo and it works on some TS mashines and on some not.

team-moeller commented 1 year ago

Hi there! It sounds like there is a problem with your access to the internet on some of your machines. Let's investigate this a bit systematically:

  1. Step: Download the demo database
  2. Step: Try it on a computer where you think it works
  3. Step: Try it on a computer, where it does not work normally If you fail here, this means that there is a problem on your machine, not in the demo database.
  4. Step: Save the script files on your hdd and set the source for the scripts to "local file" If this works, this means that the problem is in downloading the script files from the CDN.

If the problem occurs at step 4, I cannot help you. You must investigate where the problem with the internet and the access to the CDN is.

team-moeller commented 1 year ago

Hi @clm66 , did you already find the time to work on this problem? Is the problem still existing?

clm66 commented 1 year ago

Hi, thank's a lot for your efforts - I try to follow your steps on the weekend and will notify you then, best regards, Claus

clm66 commented 1 year ago

Hi again, on mashine 1 the demo worked, on mashine 2 not - as in my own database. But step 4 worked on mashine 2! I downloaded the files to disk and with source = local file it works! I imorted the configuration form in my own database and there it works now also! So thanks a lot!

Do you have an idea, why downloading the script files from the CDN failes on mashine 2 ? Probably it would be better to get this fixed, instead of having the files local, as the file may change in the future and would have to control this?

thanks again!

team-moeller commented 1 year ago

Hi @clm66 ! To my experience this is mostly a security issue. Let's try the following steps:

As an alternative:

At the end:

Good luck!

clm66 commented 1 year ago

Hi, I tried this -> the error msg 'Chart is undifined' appears in the demo file when I open the file "Better AccessChart_NNNNNNNN.html" the chart appears and the network tab shows this:

BAC

but what can i find out from this?

team-moeller commented 1 year ago

Hi @clm66 , let me summarize what I understood:

I never was in a situation like that. It sounds like a problem with the firewall. Maybe there are different rules for Access and a html-file. Sorry, I have no better answer.