We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Reload page when error

Answered
Laurier Lapointe asked on December 20, 2022

Hi flexmonster team,
We use flexmonster to display data on a screen which is installed on a ceiling (nobody is controlling it) We refresh the data every 5 minutes. Sometimes we get this error (see attach file). When the 5 minutes expires, the page reloads and all the data is displayed without any error. That happens like 2-3 times per day and I don't know why. Seems like a bug of flexmonster to me. My question is, can we reload the page automatically when this error occurs. If so, how ?
Thank you for your response. 

Attachments:
Error.png

13 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 21, 2022

Hello, Laurier!

Thank you for reporting this issue.
Similar behavior may occur when the Flexmonster client tries to load the data before it is loaded on FDS. This may happen during index refresh. Setting the "KeepDataOnRefresh": true inside the DataStorageOptionsObject prevents this issue. With this option enabled, Flexmonster will keep the older data available while refreshing the index. Kindly note that this option has been available since FDS v.2.9.15. We recommend updating the Data Server if you use an older version.
Please let us know if this solution worked for you. 

Best Regards,
Maksym

Public
Laurier Lapointe December 21, 2022

Hi,
I still have the issue 🙁
This is what I've got :
"DataStorageOptions" : {
 "DataRefreshTime" : 1,
 "CacheSizeLimit": 100,
 "KeepDataOnRefresh": true
}
 
Sometimes I also have the error on "members" instead of "fields"

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 22, 2022

Hi, Laurier!

Thank you for your response.
Could you please check once more if you updated FDS to a version newer than 2.9.15? If possible, we also highly recommend using the latest version of FDS.
Looking forward to hearing your reply.

Best Regards,
Maksym

Public
Laurier Lapointe December 22, 2022

Hi Maksym!
See attach file for the version that I'm using
Thank you

Attachments:
version.png

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 23, 2022

Hi, Lauriel!

Thank you for sharing your Flexmonster version.

Our team would also like to ensure that you are using the latest Flexmonster Data Server DLL version since the "KeepDataOnRefresh" property was added to FDS after a certain version. Here is one of the ways how to check the version and install updates using Visual Studio:

  • In Visual Studio, select Project > Manage NuGet Packages.
  • Choose the Updates tab and select the Flexmonster.DataServer.Core package.
  • The current version is shown inside the Installed text field. For updating Data server DLL, select Latest stable in the Version input field and then press the Update button.

Your code snippet from the config file shows that the "KeepDataOnRefresh" property is set correctly, so the reloading issue should be resolved by updating FDS (in case you were using a version prior to 2.9.15).

Please let us know if updating the DLL helped to solve the issue.

Best Regards,
Maksym

Public
Laurier Lapointe December 23, 2022

Hi Maksym,
I believe I have the latest one installed already. I cannot click on "Update". See attach file...

Attachments:
DataServerCore.png

Public
Maksym Diachenko Maksym Diachenko Flexmonster December 27, 2022

Hello, Laurier!

Thank you for sharing your FDS DLL version.

Keeping the data on refresh is available for this version, so we suppose something else may be causing the issue. Could you please send us FDS logs and the entire config file? 
If you do not have FDS DLL logs enabled on your server, you are welcome to check our logging configuration guide for reference.

Looking forward to hearing from you.

Best Regards,
Maksym

Public
Laurier Lapointe January 3, 2023

Hi Maksym,
I sent you a log file. I copy-pasted the log found in the Debug output window in visual studio. I think that is what you want when I read your logging configuration guide.
As for the config file, I'm not sure if it is the two files that I've sent to you.
Wishing you an happy new year!

Public
Maksym Diachenko Maksym Diachenko Flexmonster January 4, 2023

Hello, Laurier!

Thank you for the provided information and the holiday wishes. We also wish you the same.

Our team could not find the errors in the provided log file, and the configuration in the "appsettings.json" file is correct. We recommend adding the try-catch blocks around the GetFields() and GetMembers() methods and logging exceptions as they occur. When the exceptions causing the error are successfully recorded, please report to us with the stack trace showing the error.

Additionally, we would like to get back to your initial request about the ability to reload the page automatically when this error occurs. Initially, our team worked to find the cause and help to fix these errors, but since this process takes some time, we suggest trying the reloading on the error approach as a temporary workaround. This functionality can be achieved with the olapstructureerror event, which is triggered on any FDS connection errors.
You are welcome to check the example of page refresh on olapstructureerrror: https://jsfiddle.net/flexmonster/nvjfsu17/

Please let us know if refreshing the page on error works for you.

Best Regards,
Maksym

Public
Laurier Lapointe January 5, 2023

Hello Maksym,
I will try your functionality with the olapstructureerror event approach.
Thanks a lot for your help. Much appreciated
Best regards

Public
Maksym Diachenko Maksym Diachenko Flexmonster January 12, 2023

Hi, Laurier!

Hope you are doing well.
We are wondering if you had time to try the provided approach with reloading the page on olapstructureerrror event.
Looking forward to hearing from you.

Best Regards,
Maksym

Public
Laurier Lapointe January 12, 2023

Hi Maksym,
Looks like it is working, so far so good
Thank you,

Public
Maksym Diachenko Maksym Diachenko Flexmonster January 13, 2023

Hi, Laurier!

Thank you for your feedback.
We are glad to hear that the workaround with page refresh worked for you.
Feel free to contact us if any other questions arise.

Best Regards,
Maksym

Please login or Register to Submit Answer