Unhandled rejection Error: Chrome still being created - tokbox

When I use { insertDefaultUI: false } to create a video I get an "Unhandled rejection Error: Chrome still being created" when trying to cleanup after I'm done with session.disconnect().
Any ideas...?

I'm on the TokBox dev team.
The error is not something you should be concerned with, it's something internal to the SDK.
The bug is that the error is appearing at all. I have created a bug report and this error should disappear in a future release. Until then you can safely ignore it.
Thanks for the report.

I'm having the very same problem when trying to unpublish my publisher
Could you guys provide a solution?
Unhandled rejection Error: Chrome still being created
at Object.chromeMixin.reset (https://static.opentok.com/v2/js/opentok.js:41755:16)
at reset (https://static.opentok.com/v2/js/opentok.js:42837:19)
at Publisher.destroy (https://static.opentok.com/v2/js/opentok.js:43211:7)
at defaultAction (https://static.opentok.com/v2/js/opentok.js:43524:20)
at executeDefaultAction (https://static.opentok.com/v2/js/opentok.js:25584:19)
at Object.api.dispatchEvent (https://static.opentok.com/v2/js/opentok.js:25735:7)
at Publisher.self.dispatchEvent (https://static.opentok.com/v2/js/opentok.js:25427:19)
at Object.streamDestroyed (https://static.opentok.com/v2/js/opentok.js:43527:16)
at Object.unpublishFromSession (https://static.opentok.com/v2/js/opentok.js:43507:16)
at Session.unpublish (https://static.opentok.com/v2/js/opentok.js:47031:19)
at Object.me.stop (https://x/rt.js:498:17)
at b.$scope.callBreak (https://x/ler.js:16:24)
at fn (eval at compile (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:239:266), <anonymous>:4:165)
From previous event:
at createChromeMixin (https://static.opentok.com/v2/js/opentok.js:41672:21)
at new Publisher (https://static.opentok.com/v2/js/opentok.js:42826:23)
at Object.initPublisher (https://static.opentok.com/v2/js/opentok.js:44275:21)
at Object.me.start (https://x/rt.js:457:27)
at b.$scope.start (https://x/ler.js:6:24)
at fn (eval at compile (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:239:266), <anonymous>:4:161)
at e (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:284:187)
at b.$eval (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:148:347)
at b.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:149:52)
at HTMLButtonElement.<anonymous> (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:284:239)
at HTMLButtonElement.dispatch (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:4:8549)
at HTMLButtonElement.r.handle (https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js:4:5252)

I might be a bit late, but I'll share my findings. When using a custom UI on your publisher, use the following event:
publisher.on('streamDestroyed',function(event){ event.preventDefault();});
This disallows opentok calling widget destroying events which causes the exception related to this question, however now I don't know how to stop the stream lol, since if I call event.target.destroy() will generate the same exception, lol ... so I'm trying to figure that out.

Related

Debugging "Transaction simulation failed" when sending program instruction (Solana Solidity)

When attempting to make a call to a program compiled with #solana/solidity, I'm getting the following error:
Transaction simulation failed: Error processing Instruction 0: Program failed to complete
Program jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N invoke [1]
Program log: pxKTQePwHC9MiR52J5AYaRtSLAtkVfcoGS3GaLD24YX
Program log: sender account missing from transaction
Program jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N consumed 200000 of 200000 compute units
Program failed to complete: BPF program Panicked in solana.c at 285:0
Program jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N failed: Program failed to complete
jdN1wZjg5P4xi718DG2HraGuxVx1mM7ebjXpxbJ5R3N is the program's public key and pxKTQePwHC9MiR52J5AYaRtSLAtkVfcoGS3GaLD24YX is the sender's public key.
I'm using a fork of the #solana/solidity library that exposes the Transaction object so that it can be signed and sent by Phantom Wallet on the front end. The code that results in the error is as follows:
// Generate the transaction
const transaction = contract.transactions.send(...args);
// Add recent blockhash and fee payer
const recentBlockhash = (await connection.getRecentBlockhash()).blockhash;
transaction.recentBlockhash = recentBlockhash;
transaction.feePayer = provider.publicKey;
// Sign and send the transaction (throws an error)
const res = await provider.signAndSendTransaction(transaction);
I would attempt to debug this further myself, but I'm not sure where to start. Looking up the error message hasn't yielded any results and the error message isn't very descriptive. I'm not sure if this error is occurring within the program execution itself or if it's an issue with the composition of the transaction object. If it is an issue within the program execution, is there a way for me to add logs to my solidity code? If it's an issue with the transaction object, what could be missing? How can I better debug issues like this?
Thank you for any help.
Edit: I'm getting a different error now, although I haven't changed any of the provided code. The error message is now the following:
Phantom - RPC Error: Transaction creation failed. {code: -32003, message: 'Transaction creation failed.'}
Unfortunately this error message is even less helpful than the last one. I'm not sure if Phantom Wallet was updated or if a project dependency was updated at some point, but given the vague nature of both of these error messages and the fact that none of my code has changed, I believe they're being caused by the same issue. Again, any help or debugging tips are appreciated.
I was able to solve this issue, and although I've run into another issue it's not related to the contents of this question so I'll post it separately.
Regarding my edit, I found that the difference between the error messages came down to how I was sending the transaction. At first, I tried sending it with Phantom's .signAndSendTransaction() method, which yielded the second error message (listed under my edit). Then I tried signing & sending the transaction manually, like so:
const signed = await provider.request({
method: 'signTransaction',
params: {
message: bs58.encode(transaction.serializeMessage()),
},
});
const signature = bs58.decode(signed.signature);
transaction.addSignature(provider.publicKey, signature);
await connection.sendRawTransaction(transaction.serialize())
Which yielded the more verbose error included in my original post. That error message did turn out to be helpful once I realized what to look for -- the sending account's public key was missing from the keys field on the TransactionInstruction on the Transaction. I added it in my fork of the #solana/solidity library and the error went away.
In short, the way I was able to debug this was by
Using provider.request({ method: 'signTransaction' }) and connection.sendRawTransaction(transaction) rather than Phantom's provider.signAndSendTransaction() method for a more verbose error message
Logging the transaction object and inspecting the instructions closely
I hope this helps someone else in the future.

How to test an exit app scenario using detox

This questions was already raised before, but left without answer in the issue.
What is recommended way to test the current scenario, when on a click of the button there is a BackHandler.exitApp() event?
I tried to test like this:
await element(by.id('licenseCancelButton')).tap();
await expect(element(by.id('licensePage'))).toBeNotVisible();
But I get this error:
Error: No activities found. Did you forget to launch the activity by calling getActivity() or startActivitySync or similar?
at Client.execute (node_modules/detox/src/client/Client.js:92:28)
at InvocationManager.execute (node_modules/detox/src/invoke.js:11:33)
at WaitForInteraction.execute (node_modules/detox/src/android/expect.js:128:35)
at WaitForInteraction.withTimeout (node_modules/detox/src/android/expect.js:161:16)
at Context.it (e2e/firstTest.spec.js:8:69)
at process._tickCallback (internal/process/next_tick.js:68:7)

WebRtc Native-Crashed when I call peerconnection->Close()

How to close or destruct a PeerConnectionInterface object? It crashed when I'm trying to do so.
I have an object declared like this:
rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection;
It works fine after I create the PeerConnectionInterface by factory.
However, when the session is over and I try to call _peerConnection->Close(); The program crashed.
And I also try to call _peerConnection.release()->Release(); Crashed as well.
I print logs in PeerConnection.cc which is from the source code of WebRtc, and find that it crashed here, which is in Close() function and ~PeerConnection() function:
webrtc_session_desc_factory_.reset(); //PeerConnection.cc
The declare is
std::unique_ptr<WebRtcSessionDescriptionFactory> webrtc_session_desc_factory_;
So I continue to log in WebRtcSessionDescriptionFactory.cc, the ~WebRtcSessionDescriptionFactory() function. Crashed in this function:FailPendingRequests().
Entered the FailPendingRequests() function:
RTC_DCHECK(signaling_thread_->IsCurrent());
while (!create_session_description_requests_.empty()) {
const CreateSessionDescriptionRequest& request =
create_session_description_requests_.front();
//Crashed here in third or fourth loop
PostCreateSessionDescriptionFailed(request.observer,
((request.type == CreateSessionDescriptionRequest::kOffer) ?
"CreateOffer" : "CreateAnswer") + reason);
create_session_description_requests_.pop();
}
I will be really grateful for any suggestion!
I faced the same issue in iOS when implemented Kurento Library. The key to fix this issue is to dispose the resources in the right manner.
Steps I followed:
The order of creation:
Created WebRTCPeer object
Created RoomClient object
Once RoomClient connected, generated SDP Offer.
and so on.
The order of disposition:
Disconnected RoomClient first.
Kept an eye on "RTCIceConnectionState", "RTCIceGatheringState" in the WebRTC events.
Once "RTCIceConnectionState" is closed and iceGatheringState is "RTCIceGatheringStateComplete", then disposed WebRTCPeer object.
This way the problem got resolved, otherwise resources were initialised and main object were disposed, which results in crashes.
Hope that helps!

Access is denied in BackgroundTaskBuilder.Register

var builder=new BackgroundTaskBuilder();
builder.Name=name;
builder.TaskEntryPoint=taskEntryPoint;
builder.SetTrigger(trigger);
if(condition!=null)
builder.AddCondition(condition);
builder.Register(); // in this step I get exception System.UnauthorizedAccessException. Additional information: Access is denied.
This exception is throwed in Windows 8 release preview.
In consumer preview I did not get this exception.
I use SystemTrigger (SystemtriggerType.UserPresent) and SystemCondition(SystemConditionType.InternetAvailable)
In Package.appxmanifest file I set System event checkbox to true and input Entry point value.
Also in Package.appxmanifest code I removed 'Executable' attribute.
Maybe someone know how I can fix it?
Thank you in advance!
Some SystemTriggers,however do need the app to be on the lock screen:
SessionConnected ,UserPresent,UserAway and ControlChannelReset If you use these triggers without beging on the lock screen ,the BackgroundTaskBuilder.Register() call will fail with "acess denied"

org.xml.sax.SAXException: Invalid element in com.rallydev.webservice.v1_28.domain.OperationResult - Object

I've built an integration with Rally using the SOAP API so that when I target a bug in bugzilla, a user story is created and scheduled in the proper release. It also work in update, so if I just update the target the US will be associated to the specified release in Rally.
It has been working for a while, but now it seems not to work anymore.
I get the following error:
org.xml.sax.SAXException: Invalid element in com.rallydev.webservice.v1_28.domain.OperationResult - Object
at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.rallydev.webservice.v1_28.service.RallyServiceSoapBindingStub.update(RallyServiceSoapBindingStub.java:1166)
I updated to the latest API, but not luck.
Stefano,
This is a known issue in Rally and we expect it will be corrected this Saturday (3Dec11). If you need to get the code running right away, you can catch the thrown exception by editing the generated code.
As long as the SAX exception is caught, it does not prevent updates from actually succeeding. A couple customers have been able to workaround the mismatched return value by wrapping the update code and/or calls to the Rally service in a try/catch block similar to an example here on a Task:
try {
OperationResult operationResult = rallyService.update(myTask);
} catch (Exception e) {
System.out.println("Rally SAX Exception encountered");
}
Sorry for the inconvenience.
Mark