How to solve track disable error in agora when grab mic and mic drop? - agora.io

AgoraRTCError TRACK_IS_DISABLED: can not publish a disabled track:
displayCurrentSpeaker # agora-client-video.js:288
Uncaught (in promise) r {name: 'AgoraRTCException', code: 'TRACK_IS_DISABLED', message: 'AgoraRTCError TRACK_IS_DISABLED: can not publish a disabled track: track-cam-845cd018', data: undefined}
Cannot read properties of undefined (reading 'getMediaStreamTrack')
at attachStreamToBigCircle (agora-client-video.js:506)
at async changeMicSpeaker
[enter image description here][1]
I attached error's screenshot . Please provide solution
[1]: https://i.stackstrong text.imgur.com/BUH4X.png

The track is disabled, usually because you have called Track.setEnabled(false) to disable the track.
Call Track.setEnabled(true) to enable the track and retry.
If you could share more code, we can debug it further.
See how you can change the device (mic and video) here: https://docs.agora.io/en/Voice/test_switch_device_web_ng?platform=Web
I made a sample app doing the same: https://github.com/akshatvg/speakOut/blob/master/assets/js/goLive.js

Related

Odoo v15 LiveChat App will not load properly

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.

React Native cameraRoll save video to device from URL

I want to save video to a device from a URL.
I tried:
CameraRoll.saveToCameraRoll(videoURL, 'video')
and also:
CameraRoll.save(videoURL, {type: 'Video', album: 'Test'})
I'm getting this error:
The operation couldn’t be completed. (Cocoa error -1.)
What's going wrong?
It looks like you are missing link CameraRoll into Xcode.
While you fetch the file via RNFetchBlob.fetch. Pass appendExt : 'mp4' or 'mov' as config parameter alongside fileCache : true. This should fix your problem.
Also, type:'video' and not 'Video'.

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!

vjs_pause function does not exists in swf mode

With video.js 4.0.3, I got this error when using the flash mode :
Uncaught exception: TypeError: 'this.el_.vjs_pause' is not a function
Error thrown at line 2772
No problem with HTML5 mode.
The pause function seems to be unavailable in the flash object
I ran into this same JS error few days back. The fix that worked for me was to first check if the video element or it's parent is visible or not. Only when it's visible, trigger the pause method.
Hope this helps!

Adobe Air HtmlLoader - quietly failing

Hi I am trying to load page into Air using the htmlLoader class. What event listener will I need to attach to the HTMLLoader class in order for it to notify me when the page can not be loaded.
Any help much appreciated
The only event fired directly from the HTMLLoader that appears to be error handling is:
uncaughtScriptException
Signals that an uncaught JavaScript exception occurred in the HTMLLoader object.
however when you call send and pass along a URLRequest you should be able to add listeners to the Loader, from an example in the docs, this should be good enough:
dispatcher.addEventListener(Event.COMPLETE, completeHandler);
dispatcher.addEventListener(Event.OPEN, openHandler);
dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
in your case I'm guessing you'll need to use the HTMLLoader instance's loaderInfo property and add the listeners there.
Hope this helps.