Odoo v15 LiveChat App will not load properly - odoo

I have a website built on Odoo v15 Enterprise Edition (SaaS, hosted by Odoo) and I would like to activate the LiveChat feature of the website. I created a sandbox to work in so I do not affect the live website.
I followed the instructions from the Odoo Documentation and did the following:
Opened the LiveChat channel (LiveChat App > Channels) and added myself as an Operator.
Copied the code snippet from the "Widget" tab (inside the LiveChat channel) and pasted it into the <head> of my website.
Clicked on the "Go To Website" button in the top right corner of the LiveChat Channel, and then clicked on the "Unpublished" button at the top right of the screen (which changed to "Published".)
Went into the "Settings" (Settings > Website > Features > Live Chat) and chose the channel from the dropdown.
When I go to the homepage of my website I do not see a chat button and when I open the Console in Developer Tools (Chrome browser) I see these error messages:
Plain Text:
web.assets_common_minimal.min.js:85 warning: Some modules could not be started
web.assets_common_minimal.min.js:85 Missing dependencies: (3) ['web.Session', 'root.widget', 'im_livechat.legacy.im_livechat.im_livechat']
web.assets_common_minimal.min.js:90 Non loaded modules: (2) ['web.session', 'im_livechat.livesupport']
web.assets_common_minimal.min.js:91 Debug: {web.session: {…}, im_livechat.livesupport: {…}}
web.assets_common_minimal.min.js:78 Uncaught Error: Service web.session already defined
at odoo.define (web.assets_common_minimal.min.js:78:29)
at web.assets_frontend_lazy.min.js:1594:6
It looks like web.session has already been defined. When I located the .xml file that contained the code for this (im_livechat.loader), I found it contained the following:
<t t-if="web_session_required">
odoo.define('web.session', function (require) {
var Session = require('web.Session');
var modules = odoo._modules;
return new Session(undefined, "<t t-esc="info['server_url']"/>", {modules:modules, use_cors: true});
});
</t>
Just to see what would happen, I commented out this section of the im_livechat.loader file and reloaded the homepage. The button was now visible, but was clearly not showing up the way it should be:
I also saw an error pop up (URL has been removed):
UncaughtPromiseError > TypeError
Uncaught Promise > Cannot read properties of undefined (reading 'bus_service')
TypeError: Cannot read properties of undefined (reading 'bus_service')
at ComponentAdapter._trigger_up (https://***/web/assets/499024-5bf19f0/1/web.assets_frontend_lazy.min.js:1565:32)
at Class._trigger_up (https://***/web/assets/499021-d833d51/1/web.assets_common_lazy.min.js:4728:462)
at Class._trigger_up (https://***/web/assets/499021-d833d51/1/web.assets_common_lazy.min.js:4728:462)
at Class.trigger_up (https://***/web/assets/499021-d833d51/1/web.assets_common_lazy.min.js:4728:280)
at Class.call (https://***/web/assets/499021-d833d51/1/web.assets_common_lazy.min.js:4781:372)
at Class.start (https://***/web/assets/499024-5bf19f0/1/web.assets_frontend_lazy.min.js:2264:6)
at prototype.<computed> (https://***/web/assets/499021-d833d51/1/web.assets_common_lazy.min.js:4581:488)
at Class.start (https://***/web/assets/499024-5bf19f0/1/web.assets_frontend_lazy.min.js:2346:77)
at Class.start (https://***/web/assets/499021-d833d51/1/web.assets_common_lazy.min.js:4584:371)
at https://***/web/assets/499021-d833d51/1/web.assets_common_lazy.min.js:4929:52
When I check the Console in Developer Tools I see this error:
Plain Text:
web.assets_frontend_lazy.min.js:1565 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'bus_service')
at ComponentAdapter._trigger_up (web.assets_frontend_lazy.min.js:1565:32)
at Class._trigger_up (web.assets_common_lazy.min.js:4728:462)
at Class._trigger_up (web.assets_common_lazy.min.js:4728:462)
at Class.trigger_up (web.assets_common_lazy.min.js:4728:280)
at Class.call (web.assets_common_lazy.min.js:4781:372)
at Class.start (web.assets_frontend_lazy.min.js:2264:6)
at prototype.<computed> (web.assets_common_lazy.min.js:4581:488)
at Class.start (web.assets_frontend_lazy.min.js:2346:77)
at Class.start (web.assets_common_lazy.min.js:4584:371)
at web.assets_common_lazy.min.js:4929:52
Can anyone point me in the right direction? Any help would be greatly appreciated.
Thank you!

We did end up solving this issue.
Apparently there was an older view (named "Livechat: include loader on Website") which was deactivated, but still causing issues with the way the code for the chat button was being loaded. We think it was an older view from a previous version of Odoo (we are currently running v15.)
After deleting the deactivated view the chat window began showing up correctly and everything worked as expected.

Related

Get rid of "Remote debugger is in a background tab" warning in React Native

I've started a new React Native project and I keep getting the following warning:
Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window).
It's a bit annoying so I wanna know how I can get rid of it? I'm running the debugger in Chrome and I moved it to a seperate window but it did not help.
If you have the Maintain Priority checkbox in the debugger window, try enabling it before you jump to any of the solutions below.
To get rid of the warning in your whole project add the following to your outermost Javascript file (most of the time that's index.js for React Native)
for react-native v0.63+:
Use LogBox:
https://reactnative.dev/docs/debugging#logbox
LogBox.ignoreLogs(['Remote debugger']);
for react-native v0.57 - v0.62:
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['Remote debugger']);
Reference this from the official React Native docs:
https://facebook.github.io/react-native/docs/debugging.html
react-native v0.56 or below:
Add the following early on in your code:
console.ignoredYellowBox = ['Remote debugger'];
Easy, simple and specific to that error. Works for me. Can substitute for any text you want.
this solution is work for me
open/move http://localhost:8081/debugger-ui (default path for remote debugging) on the separate window
maybe that could help :)
You can use React Native Debugger available at https://github.com/jhen0409/react-native-debugger It is a standalone app for debugging React Native apps during development.
Move http://localhost:*****/debugger-ui on the separate window.
Restart Remote JS Debugging.
For me warning went away by checking Maintain Priority Checkbox!
It is because of number of tabs are opened in the browser with React Native Remote Debugger UI tab. I also faced the same issue.
To overcome this warning message you can use any one method from the following:
Open an incognito tab then paste http://localhost:8081/debugger-ui on address bar and press ENTER. Finally reload the app (Command+R).
Close all the tabs in the browser. Keep only 1 tab opened then hit http://locahost:8081/debugger-ui then reload the app (Command+R).
As mentioned by #jakeforaker in one of the comment. The warning went away by simply opening the remote debugger in a separate window instead of a tab in your existing window of your browser (you have to reload your simulator though).
As the warning is saying keeping the remote debugger in the same window as other tabs
may cause apps to perform slowly
So i think simply suppressing warning as mentioned by #kjonsson:- console.ignoredYellowBox = ['Remote debugger']; doesnt seem to be best solution.
Since this commit in March 2017, you can enable the Maintain Priority checkbox. When enabled, it silently plays a base64-encoded .wav file to prevent the debugger's browser tab from entering low-power mode, which can affect websocket performance. This will effectively prevent the warning you describe.
This issue was resolved when I closed all open Chrome windows and started the Remove Debugging again. I had previously had open Chrome windows, so it 'seems' that having them open kills performance.
I think the accepted answer is no longer accurate (at least for React Native v0.57+).
The correct code is now:
import { YellowBox } from 'react-native';
YellowBox.ignoreWarnings(['Remote debugger']);
Reference this from the official React Native docs:
https://facebook.github.io/react-native/docs/debugging.html
I am on Macbook. I fixed this issue by bringing the Debugger window on main desktop, rather than on having it on separate desktop which it thinks is in "Background".
I had the same issue pop up yesterday. Googling it led to this Stack Overflow post. In one of the response (by adriansprod), he suggested:
Chrome debugger in it's own window fixes. But annoying problem
It is likely that your React Native debugger is not in its own Chrome browser window but in a Chrome browser tab. Pulling it out as its own window, as adriansprod suggest, fixed this for me.
The (very annoying) error message is handled by debuggerWorker.js, which sadly doesn't include any configuration options to turn off the message. So for the time being there are no ways you can configure your application to disable the message.
The related code is outlined below (original licence applies):
var visibilityState;
var showVisibilityWarning = (function() {
var hasWarned = false;
return function() {
// Wait until `YellowBox` gets initialized before displaying the warning.
if (hasWarned || console.warn.toString().includes('[native code]')) {
return;
}
hasWarned = true;
console.warn(
'Remote debugger is in a background tab which may cause apps to ' +
'perform slowly. Fix this by foregrounding the tab (or opening it in ' +
'a separate window).'
);
};
})();
As you see, no configuration options are used, the whole thing is scoped off locally (see the above repo link for further details).
I also have faced with same issue about one week ago and finally i have found solution that works excelent for me
It called reactotron, you can find it here - https://github.com/reactotron/reactotron and you can use it to:
* view your application state
* show API requests & responses
* perform quick performance benchmarks
* subscribe to parts of your application state
* display messages similar to console.log
* track global errors with source-mapped stack traces including saga stack traces!
* dispatch actions like a government-run mind control experiment
* hot swap your app's state
* track your sagas
I hope my post was helpful and you never will faced with this tedious warning .
Good luck
I use this in index.js
if (__DEV__) {
console.ignoredYellowBox = [
'Remote debugger',
'Warning: isMounted… is deprecated',
'Module RCTImageLoader'
];
}
I had minimised the "http://localhost:8081/debugger-ui/" window. Just opening it up (un minimising), and reloading the app removed the warning.
there might be chances that Another debugger is already connected to packager.
so close your terminal and debugger google chrome.
if you are using visual studio's package manger then don't start package manager by Mac/other os terminal command.
so close all terminal and stop on going package manger and google chrome debugger.
start the process again.
Similar to Akshay Vijay Jain, mine went away by ticking this box!

Odoo 9 - cannot load custom module

I am brand new to odoo, just installed version 9 and made a module 'aidentest' using
.>>python odoo.py scaffold aidentest addons
That created the aidentest module in the addons folder. Uncommented everything in the autogenerated files
but when I went to check out my 'Hello World' page at
http://localhost:8069/aidentest/aidentest
I got a 404 not found
So I went to apps to try and load my module, but I could not find it.
Does anyone know what I need to do on Odoo 9 to load up and start coding my custom module?
Briefly: You have to activate developer mode by going to Top right menu>about>activate developer mode
I had basically given up, and was mindlessly clicking about when I hit the 'About' link on the generic-whiteguy dropdown. I had to actually stop thinking before I was able to locate the completely senseless place where they put the thing I need.
The About modal window popped up, and in it was an activate the developer mode button
Some things changed immediately, but I still couldn't find my custom module.
Then I walked away, came back and when I returned I had some auto-generated emails (new things had loaded - slowly). Did this mean that maybe my module had also become accessible? I checked, and sure enough, there it was.
ZERO DOCUMENTATION about this
Please check the config file.Then send the last error it has.

CasperJS screenshot comes as blank after selecting a link

Using casperJS script, after successful login into application, and clicking on a link, following error is thrown and web page comes as blank:
ERROR: TypeError: 'undefined' is not a function (evaluating
'g.getItem.bind(g)')
TRACE:
-> scripts/dojo/dojo/dojo.js: 20
ERROR: TypeError: 'undefined' is not a function (evaluating
'g.getItem.bind(g)')
The application is build on top of dojo.
You’ve written some code that tries to use Function.prototype.bind. Function.prototype.bind doesn’t exist in PhantomJS. You need to change your code to use dojo/_base/lang.hitch instead.

using WL.TabBar in Server_Generated_Pages renders items as list items instead of tabs

I am trying to use WL.TabBar api and create tabs in the server generated pages but looks like items are not rendered as tabs. But rendered one below the other with dots for each items (like indicated/shown below).
*Item1
*Item2
*Item3
*Item4
Any idea what could be the problem ?. Thanks
Cool, Here are the environment details:
(1) Worklight version 506. Running on Android simulator
(2) Sample code used:
WL.TabBar.setParentDivId("tabpane");
WL.TabBar.init();
WL.TabBar.addItem("item1", function()
{ openNativePage(); },"Item1",{ image: "css/images/Tab.jpg",
imageSelected : "css/images/Tab.jpg"
? });
WL.TabBar.setVisible(true);
(3) I don't see any error messages as such. But I see the below warning in LogCat:
05-16 12:37:42.796: I/Web Console(289): Falling back on PROMPT mode since _cordovaNative is missing. at hostname/wps/contenthandler/!ut/p/digest!SlQs_clcwL2z1b8kIsNvEg/mashup/ra:collection?themeID=ZJ_CGAH47L00OEP00IDBHRNLP0830&locale=en&mime-type=text%2Fplain&entry=wl_client__0.0%3Aconfig_js&entry=wl_init__0.0%3Aconfig_js&entry=wp_theme_high_contrast__0.0%3Aconfig_js&entry=wp_theme_edit__0.0%3Aconfig_js&entry=wp_theme_menus__0.0%3Aconfig_js&entry=wp_theme_skin_region__0.0%3Aconfig_js&entry=wp_one_ui_30__0.0%3Aconfig_js&entry=wp_status_bar__0.0%3Aconfig_js:1044
hmm, I think found the answer. The problem was the CSS files (wlclient.css + wlgap.android.css) were missing at backed the Server (where the custom application exist). I had copied only the native JavaScript files from wlclient and commons folder. Thanks.

Use of XMLHttpRequest in Dashboard widget failing

I am unable to get an XMLHttpRequest object to work correctly in a Dashboard widget I am writing. I've isolated it to a trivial example not working in the global scope of the main.js file:
xhr = new XMLHttpRequest;
xhr.open( 'GET', "http://google.com", false );
xhr.send('');
When the last line is executed I get the error "ABORT_ERR: XMLHttpRequest Exception 102" (this is in the Dashcode debugger).
Does anyone have any idea what could be wrong here?
You need to select "Allow Network Access" in the "Widget Attributes" pane.
OK, I've found it (three hours): you need to add the following key to the Info.plist file:
<key>AllowNetworkAccess</key>
<true/>
I've got the same trouble unresolved even after AllowNetworkAccess were added to my info.plist. I've tried to change this key to AllowFullAccess, but nothing changed. After system reboot it worked fine o_O
The steps to take are:
From the menu, choose "Dashcode > Preferences..." and click on the Destinations tab.
Below the left column, click on the plus sign to create a new destination.
For an external website, choose FTP in the Type drop down. Fill out the Server, Path, User name and Password. Close the Preferences pane.
Back in Dashcode, click on the Widget Attributes icon in the left column.
Check the boxes of Allow network Access and Allow External File Access in the main column.
You should be able to run the widget without the 102 Exception error (if you are online)