Rabs Posted August 31, 2023 Report Posted August 31, 2023 Hi @mc_ & Kazoo community, hope everyone is doing well I'm not sure if this is a timezone issue on Kazoo 4.3 or a system time issue but we have a problem with time stamping on our call logs.. All the call logs are one hour ahead. For eg: The account is set to: Australia/Melbourne timezone and the Current time is 12:43 PM 31 Aug 2023. In the Centos 7 system time on which Kazoo 4.3 was installed date is Thu Aug 31 02:43:00 UTC 2023 but in the monster-ui call log it shows 01:43 PM 31 Aug Any idea how this can be fixed? Any help would be appreciated. Thank you Quote
Administrators mc_ Posted August 31, 2023 Administrators Report Posted August 31, 2023 1> UTC = calendar:datetime_to_gregorian_seconds({{2023,8,31}, {2,43,00}}). 63860668980 2> Mel = kz_time:adjust_utc_timestamp(UTC, <<"Australia/Melbourne">>). 63860704980 3> calendar:gregorian_seconds_to_datetime(Mel). {{2023,8,31},{12,43,0}} It appears KAZOO at least knows what time it is in Melbourne. KAZOO typically gives the API response in UTC seconds so I would investigate the UI conversion. Quote
2600Hz Employees Ramen Posted August 31, 2023 2600Hz Employees Report Posted August 31, 2023 (edited) Hi @Rabs for Monster UI there was a issue but it was fixed though only against master/Monster UI 5.x releases. The fix PR(s) would be https://github.com/2600hz/monster-ui/pull/1059 and https://github.com/2600hz/monster-ui-voip/pull/485 Edited August 31, 2023 by Ramen Fixed incorrect PR link (see edit history) Quote
Rabs Posted September 1, 2023 Author Report Posted September 1, 2023 Thank you @Ramen and @mc_ for your prompt response @Ramen Would you provide any guide/direction on how to manually apply this fix on monster-ui 4.3? Or do I have to manually rebuild monster-ui using 5.X GitHub and would that work on Kazoo 4.3.? Looking forward to your response Quote
2600Hz Employees Ramen Posted September 1, 2023 2600Hz Employees Report Posted September 1, 2023 @Rabs on way would be to update moment.js library and callLogs.js. You could do that by download monster-ui and monster-ui-voip from GitHub with branch 4.3 after that update moment.js with the changes that are in the PR https://github.com/2600hz/monster-ui/blob/2391d035888fe9fcb676bb28c5b5aa8449a35cbc/src/js/vendor/moment.js for moment.js and https://github.com/2600hz/monster-ui-voip/blob/a249edd45e60052b4624efc4020766e647643a83/submodules/callLogs/callLogs.js for callLogs.js Once that is done run gulp build-prod and copy main.js from /dist/js and callLogs (attaching file to this message in case you have any issues) to the same location where you have the production Monster UI. callLogs.js main.js Quote
Rabs Posted September 4, 2023 Author Report Posted September 4, 2023 @Ramen Thank you so much for your support and also, Your forward-thinking is much appreciated. I have uploaded your attached file into the respective folders: main.js --> /var/www/html/monster-ui/js/main.js callLogs.js ---> /var/www/html/monster-ui/apps/voip/submodules/callLogs/callLogs.js After that, on my Monster-UI - I pressed Ctrl+R. The result was a blank white screen on the SmartPBX App as per the attached image below. All other apps like Number, Voicemail, Accounts, etc. are working except SmartPBX after replacing the previous files with the new files. If I roll back the changes, SmartPBX will start to work. I also tried to npm install before gulp build-prod (apparently won't work without running npm install first) on 4.3 Github branch and that resulted in an error. Logs are pasted below for your reference. (my OS is Centos 7) could be related to npm version issues. Kindly advise what npm version should I use On 9/2/2023 at 7:20 AM, Ramen said: in case you have any issues Yes, I did run into npm install issues with 4.3 branch. npm WARN deprecated core-js@2.6.11: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path /opt/monster-ui/node_modules/node-sass npm ERR! command failed npm ERR! command sh -c -- node scripts/build.js npm ERR! Building: /usr/bin/node /opt/monster-ui/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! gyp info it worked if it ends with ok npm ERR! gyp verb cli [ npm ERR! gyp verb cli '/usr/bin/node', npm ERR! gyp verb cli '/opt/monster-ui/node_modules/node-gyp/bin/node-gyp.js', npm ERR! gyp verb cli 'rebuild', npm ERR! gyp verb cli '--verbose', npm ERR! gyp verb cli '--libsass_ext=', npm ERR! gyp verb cli '--libsass_cflags=', npm ERR! gyp verb cli '--libsass_ldflags=', npm ERR! gyp verb cli '--libsass_library=' npm ERR! gyp verb cli ] npm ERR! gyp info using node-gyp@3.8.0 npm ERR! gyp info using node@16.18.1 | linux | x64 npm ERR! gyp verb command rebuild [] npm ERR! gyp verb command clean [] npm ERR! gyp verb clean removing "build" directory npm ERR! gyp verb command configure [] npm ERR! gyp verb check python checking for Python executable "/usr/bin/python3" in the PATH npm ERR! gyp verb `which` succeeded /usr/bin/python3 /usr/bin/python3 npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack File "<string>", line 1 npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! gyp ERR! stack ^ npm ERR! gyp ERR! stack SyntaxError: invalid syntax npm ERR! gyp ERR! stack npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:402:12) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1100:16) npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) npm ERR! gyp ERR! System Linux 3.10.0-1160.53.1.el7.x86_64 npm ERR! gyp ERR! command "/usr/bin/node" "/opt/monster-ui/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm ERR! gyp ERR! cwd /opt/monster-ui/node_modules/node-sass npm ERR! gyp ERR! node -v v16.18.1 npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! gyp ERR! not ok npm ERR! Build failed with error code: 1 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2023-09-04T02_28_04_035Z-debug-0.log Quote
2600Hz Employees Ramen Posted September 6, 2023 2600Hz Employees Report Posted September 6, 2023 On 9/4/2023 at 12:21 AM, Rabs said: I have uploaded your attached file into the respective folders: main.js --> /var/www/html/monster-ui/js/main.js callLogs.js ---> /var/www/html/monster-ui/apps/voip/submodules/callLogs/callLogs.js After that, on my Monster-UI - I pressed Ctrl+R. The result was a blank white screen on the SmartPBX App as per the attached image below. All other apps like Number, Voicemail, Accounts, etc. are working except SmartPBX after replacing the previous files with the new files. If I roll back the changes, SmartPBX will start to work. Interesting. I just tested with https://github.com/2600hz/monster-ui/tree/4.3 on my local install and it seems to be working, could you please check which Monster UI package you have in staging as well as share the console logs if any for when those files are changed/the white screen in voip/SmartPBX On 9/4/2023 at 12:21 AM, Rabs said: I also tried to npm install before gulp build-prod (apparently won't work without running npm install first) on 4.3 Github branch and that resulted in an error. Logs are pasted below for your reference. (my OS is Centos 7) could be related to npm version issues. Kindly advise what npm version should I use As per Monster UI documentation node >= 12 & npm. However, my default for development/testing is v14.18.0 and you can follow for investigation on local install Clone repos for Monster UI and voip/SmartPBX with branch 4.3 Change node version to v14.18.0 Install dependencies using npm install Update config.js and you should be able to use the same as your staging environment Make changes to to Monster UI and voip/SmartPBX as per https://github.com/2600hz/monster-ui/blob/2391d035888fe9fcb676bb28c5b5aa8449a35cbc/src/js/vendor/moment.js for moment.js and https://github.com/2600hz/monster-ui-voip/blob/a249edd45e60052b4624efc4020766e647643a83/submodules/callLogs/callLogs.js for callLogs.js Build and launch the web server using gulp If everything worked as expected run gulp build-prod for creating main.js Let me know how that goes/if you need any further assistance 🙂 Quote
Rabs Posted September 7, 2023 Author Report Posted September 7, 2023 (edited) @Ramen Thank you so much for your detailed instructions. I changed the node version to 14.18.0 and it worked on 4.3. Btw, I was using v16.18.1. Another interesting way I was able to solve the issue was by downloading the master branch of monster-ui, and monster-voip and being successful in building from scratch. Once the building was completed, I replaced the entire monster-ui folder with the latest files and folder from the dist folder and that seems to have worked. It was kinda long path but totally worth it!! Edited September 7, 2023 by Rabs (see edit history) Quote
2600Hz Employees Ramen Posted September 7, 2023 2600Hz Employees Report Posted September 7, 2023 @Rabs utilizing the master branch instead of simply updating the library and callLogs would have been a viable alternative. Nonetheless, I would personally refrain from doing so due to the substantial differences between the 4.3.x and master/5.3.x versions. There is a possibility that certain functionalities may have been altered; for example there is new Call Forwarding update coming and when merged new build from master will defiantly break Call Forwarding on 4.3 in voip/SmartPBX Quote
Rabs Posted September 8, 2023 Author Report Posted September 8, 2023 @Ramen In that case, I would refrain from doing so and will fall back to 4.3. Thank you so much for your support and prompt response. Much appreciated :) Quote
2600Hz Employees Ramen Posted September 8, 2023 2600Hz Employees Report Posted September 8, 2023 No worries and always here to help @Rabs though please let me know if you get that done/fixed on 4.3 (so that I can sleep better at night 😅) Quote
Rabs Posted September 11, 2023 Author Report Posted September 11, 2023 On 9/2/2023 at 7:20 AM, Ramen said: download monster-ui and monster-ui-voip from GitHub with branch 4.3 after that update moment.js with the changes that are in the PR https://github.com/2600hz/monster-ui/blob/2391d035888fe9fcb676bb28c5b5aa8449a35cbc/src/js/vendor/moment.js for moment.js and https://github.com/2600hz/monster-ui-voip/blob/a249edd45e60052b4624efc4020766e647643a83/submodules/callLogs/callLogs.js for callLogs.js Once that is done run gulp build-prod @Ramen I have followed the above steps and the outcome was not as expected. The calllog submodule does not function with I use PR https://github.com/2600hz/monster-ui-voip/blob/a249edd45e60052b4624efc4020766e647643a83/submodules/callLogs/callLogs.js Is there any other way to fix it with the calllog code block? Also, I have attached the dist folder for you incase if you would like to check it out on your end. dist.tar.gz Quote
2600Hz Employees Ramen Posted October 5, 2023 2600Hz Employees Report Posted October 5, 2023 @Rabs did you update the entire application or just specific files? Could you specify what you observe in the CallLogs submodule after the modification? Also, I apologize for the delayed response; I inadvertently overlooked your last message 😓 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.