i am trying to change the privacy settings of vimeo video using api class
below is my code
$vimeo = new phpVimeo('myconsumer_key', 'myconsumer_secret');
$info = $vimeo->call('vimeo.videos.setPrivacy', array('video_id' =>$videoid,'privacy'=>'nobody','users'=>$username,'password'=>""));
i provided the consumer key and consumer secret key which i generated from https://developer.vimeo.com/apps/new but when i call the function error occoured
Fatal error: Uncaught exception 'VimeoAPIException' with message 'Permission Denied' in D:\phpweb\Rohith\vimeo_video\vimeo.php:239 Stack trace: #0 D:\phpweb\Rohith\vimeo_video\vimeo.php(275): phpVimeo->_request('vimeo.videos.se...', Array, 'GET', 'http://vimeo.co...', true) #1 D:\phpweb\Rohith\vimeo_video\disablevideo.php(18): phpVimeo->call('vimeo.videos.se...', Array) #2 {main} thrown in D:\phpweb\Rohith\vimeo_video\vimeo.php on line 239
Related
I am new to WebRTC and triyng to create my first app. I have found this article https://www.tutorialspoint.com/webrtc/webrtc_quick_guide.htm and did as it was said there. The resulted app works fine if I test it in the Chrome. But when I try to test this app in 2 browser (Chrome and Mozilla) it gives me this error:
Uncaught (in promise) DOMException: Failed to execute
'setRemoteDescription' on 'RTCPeerConnection': Session error code:
ERROR_CONTENT. Session error description: Data channel type mismatch.
Expected RTP, got SCTP..
This happens when I send an offer from Mozilla client and Chrome client tries to give an answer to this offer in this part of code:
myConnection.setRemoteDescription(new RTCSessionDescription(offer));
myConnection.createAnswer(function (answer) {
myConnection.setLocalDescription(answer);
send({
type: "answer",
answer: answer
});
}, function (error) {
alert("oops...error"); //<-- this alert fires all the time
});
I have googled this and all I have found is set new RTCPeerConnection(configuration, { optional: [{RtpDataChannels: false}] }) but if I do so then when I try to send a message it says that dataChannel.readyState is not openned.
What do I do wrong? Any help appriciated!
Thanks!
Remove optional: [{RtpDataChannels: true}] and then wait for the datachannel.onopen event to fire before attempting to send messages.
I'm using react-admin with standard crud options, I want to react to the RA/CRUD_GET_LIST_FAILURE (and all others in the future) to logout the user if the error is a 401 (like when the token timed out)
How am I supposed to do this ?
On custom requests I have my own sagas which handle this in the catch part and correctly do the job.
If I try to intercept the RA/CRUD_GET_LIST_FAILURE like this :
function * loadingErrorRA (action) {
var e = action.payload;
console.error('loadingError',action);
if(action.error === "Unauthorized"){
//I can't find a better way because I don't have access to the fetch response object in here
yield put(userLogout());
yield put(showNotification('Disconnected','warning'));
} else {
yield put(showNotification('Error '+action.error,'warning'));
}
}
function * errorLoadingSaga() {
yield takeLatest('RA/CRUD_GET_LIST_FAILURE', loadingErrorRA);
}
I have a blank screen and an error pops :
ListController.js:417 Uncaught TypeError: Cannot read property 'list' of undefined
at Function.mapStateToProps [as mapToProps] (ListController.js:417)
at mapToPropsProxy (wrapMapToProps.js:43)
at handleNewPropsAndNewState (selectorFactory.js:34)
at handleSubsequentCalls (selectorFactory.js:67)
at pureFinalPropsSelector (selectorFactory.js:74)
at Object.runComponentSelector [as run] (connectAdvanced.js:26)
at Connect.componentWillReceiveProps (connectAdvanced.js:150)
at callComponentWillReceiveProps (react-dom.development.js:11527)
....
index.js:2178 The above error occurred in the <Connect(TranslatedComponent(undefined))> component:
in Connect(TranslatedComponent(undefined)) (created by List)
in List (created by WithStyles(List))
in WithStyles(List) (at SalesByOrganismList.js:40)
in div (at SalesByOrganismList.js:39)
in SalesByOrganismList (created by WithPermissions)
in WithPermissions (created by Connect(WithPermissions))
in Connect(WithPermissions) (created by getContext(Connect(WithPermissions)))
...
And then saga catch it with :
index.js:2178 uncaught at loadingErrorRA TypeError: Cannot read property 'list' of undefined
at Function.mapStateToProps [as mapToProps]
...
Thanks for the help
https://marmelab.com/react-admin/DataProviders.html#error-format
When the API backend returns an error, the Data Provider should throw an Error object. This object should contain a status property with the HTTP response code (404, 500, etc.). React-admin inspects this error code, and uses it for authentication (in case of 401 or 403 errors). Besides, react-admin displays the error message on screen in a temporary notification.
And https://marmelab.com/react-admin/Authentication.html#catching-authentication-errors-on-the-api
Each time the API returns an error, the authProvider is called with the AUTH_ERROR type. Once again, it’s up to you to decide which HTTP status codes should let the user continue (by returning a resolved promise) or log them out (by returning a rejected promise).
Using opentok.js v2, the video channel works fine with Chrome and Firefox . The opentok version used is from this link: https://static.opentok.com/v2/js/opentok.min.js
But it doesn't work with safari 11.0.3.
On session's stream created event, it generates following error message "The stream was unable to connect due to a network error. Make sure your connection isnt blocked by a firewall"
The publisher is published successfully i.e session.publish(..) works fine.
The code below is used to make a video call:
this.session=OT.initSession(this.apiKey, this.sessionId);
this.session.on({
streamCreated: (event) => {
this.session.subscribe(event.stream, 'subscriber');
},
streamDestroyed: (event) => {
console.log(`Stream ${event.stream.name} ended because ${event.reason}`);
}
});
this.session.connect(this.token, () => {
this.publisher=OT.initPublisher('publisher');
this.session.publish(this.publisher);
});
}
Other exceptions in console generated by opentok.js are as follows:
[Error] OT.exception :: title: undefined (1554) msg: OT.Subscriber PeerConnection Error: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
_exceptionHandler (vendor.js:150924)
handleJsException (vendor.js:151002)
onPeerConnectionFailure (vendor.js:162673)
(anonymous function) (vendor.js:162414)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)
[Error] OT_ICE_WORKFLOW_FAILED: ICEWorkflow: Subscriber PeerConnection with connection (not found) failed: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
dispatchOTError (vendor.js:159161)
(anonymous function) (vendor.js:160080)
handleThisOnce (vendor.js:137437)
(anonymous function) (vendor.js:137675)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)
[Error] OT.exception :: title: undefined (1554) msg: ICEWorkflow: Subscriber PeerConnection with connection (not found) failed: OT.Subscriber failed to subscribe to a stream in a reasonable amount of time
error
_exceptionHandler (vendor.js:150924)
handleJsException (vendor.js:151002)
dispatchOTError (vendor.js:159163)
(anonymous function) (vendor.js:160080)
handleThisOnce (vendor.js:137437)
(anonymous function) (vendor.js:137675)
onInvokeTask (vendor.js:4239)
runTask (polyfills.js:3:10225)
invokeTask (polyfills.js:3:16182)
n (polyfills.js:2:31400)
All the above errors are generated only on Safari browser.
You need to make sure you have created a Safari Project in your OpenTok Account Portal. More details at https://tokbox.com/developer/sdks/js/safari/
It looks like you're using a polyfills.js file. If that is the polyfill from Angular that includes zone.js then you will need to include the fix for RTCPeerConnections 'zone.js/dist/webapis-rtc-peer-connection' in your polyfills.js file.
import 'zone.js/dist/webapis-rtc-peer-connection';
You will also probably want to include the polyfill for getUserMedia. More details at https://github.com/angular/zone.js/issues/948#issuecomment-357558384
Well, I've started a simple project with freediameter library. what I need to achieve in my project is to create a client diameter application that could send some CCR request to a diameter server.
for this matter, I tried to create a new extension for freediameter daemon.
So, the first thing I did was to setup the peer diameter server in config file:
ConnectPeer = "vm-pc.my.domain" { No_TLS; ConnectTo = "192.168.56.2"; Port=3868; };
and then initialize a request message in ta_entry function, in message body i specified the Destination-Host and Destination-Realm but still I receive this error:
01/10/17,01:55:24.980611 ERROR Routing error: 'No remaining suitable candidate to route the message to' for the following message:
01/10/17,01:55:24.980620 ERROR 'Credit-Control-Request'
01/10/17,01:55:24.980628 ERROR Version: 0x01
01/10/17,01:55:24.980635 ERROR Length: 20
01/10/17,01:55:24.980642 ERROR Flags: 0xC0 (RP--)
01/10/17,01:55:24.980649 ERROR Command Code: 272
01/10/17,01:55:24.980656 ERROR ApplicationId: 4
01/10/17,01:55:24.980664 ERROR Hop-by-Hop Identifier: 0x00000000
01/10/17,01:55:24.980671 ERROR End-to-End Identifier: 0xDCA05EF4
01/10/17,01:55:24.980678 ERROR {internal data}: src:(nil)(0) rwb:0x0 rt:0 cb:0x80523df30,0x0(0x803397da0) qry:0x0 asso:0 sess:0x0
01/10/17,01:55:24.981562 ERROR AVP: 'Session-Id'(263) l=8 f=-M val="hadi-pc.my.domain;1484000714;6"
01/10/17,01:55:24.981569 ERROR AVP: 'Origin-Host'(264) l=8 f=-M val="hadi-pc.my.domain"
01/10/17,01:55:24.981577 ERROR AVP: 'Origin-Realm'(296) l=8 f=-M val="my.domain"
01/10/17,01:55:24.981584 ERROR AVP: 'Destination-Host'(293) l=8 f=-M val="vm-pc.my.domain"
01/10/17,01:55:24.981591 ERROR AVP: 'Destination-Realm'(283) l=8 f=-M val="my.domain"
01/10/17,01:55:24.981599 ERROR AVP: 'Auth-Application-Id'(258) l=12 f=-M val=4 (0x4)
01/10/17,01:55:24.981606 ERROR AVP: 'CC-Request-Type'(416) l=12 f=-M val='EVENT_REQUEST' (4 (0x4))
01/10/17,01:55:24.981613 ERROR AVP: 'CC-Request-Number'(415) l=12 f=-M val=2 (0x2)
Can anybody help me on this ?
ps: as I see in the logs the CER/CEA are normal.
What Origin-Realm was signaled in the Capability-Exchange-Answer message when the connection was established?
The Diameter request routing process (as described in https://www.rfc-editor.org/rfc/rfc6733#section-6.1) relies on the realm, so if the Origin-Realm returned by the peer is not "my.domain", freeDiameter will not route to this peer, even if the Origin-Host matches.
Based on the following reference:- Worklight Adapter getting pdf file from rest service, i got the PDF file from tomcat server through the worklight adapter. The server side code is:-
var input = {
method : 'get',
returnedContentType : 'plain',
path : '/PDF/example-abstract.pdf'
};
return WL.Server.invokeHttp(input);
When i invoke the invoke the procedure i am able to successfully retrieve the result. When i invoke the same procedure from client side like below:-
var invocationData = {
adapter: 'PdfReader',
procedure: 'readPDF',
parameters: []
};
I am unable to receive the response in the success handler. In logcat it showing the following error:-
07-03 13:07:05.330: E/pdf(4214): [http://Path-to-pdf:10080/pdf/apps/services/api/pdf/android/query] exception. SyntaxError: Unexpected token ILLEGAL
07-03 13:07:05.377: D/dalvikvm(4214): GC_FOR_ALLOC freed 347K, 10% free 8082K/8967K, paused 19ms
07-03 13:07:05.424: D/dalvikvm(4214): GC_CONCURRENT freed 155K, 7% free 8390K/8967K, paused 2ms+3ms
07-03 13:07:05.424: D/pdf(4214): response [http://Path-to-pdf:10080/pdf/apps/services/api/pdf/android/query] success: {"responseID":"2","statusCode":200,"text":"%PDF-1.4\n%????\n3 0 obj <<\n\/Length 2445 \n\/Filter \/FlateDecode\n>>\nstream\nx?X[??\n~?_?#?YQ?O?dw??M??3?4'\u000f0 \\Shorted
07-03 13:07:05.424: W/PluginManager(4214): THREAD WARNING: exec() call to Logger.DEBUG blocked the main thread for 45ms. Plugin should use CordovaInterface.getThreadPool().
07-03 13:07:05.455: E/pdf(4214): [http://Path-to-pdf:10080/pdf/apps/services/api/pdf/android/query] exception. TypeError: Cannot read property 'isSuccessful' of undefined
07-03 13:07:05.455: D/CordovaLog(4214): file:///data/data/com.pdf/files/www/default/worklight/worklight.js: Line 3320 : Uncaught SyntaxError: Unexpected token ILLEGAL
07-03 13:07:05.455: E/Web Console(4214): Uncaught SyntaxError: Unexpected token ILLEGAL at file:///data/data/com.pdf/files/www/default/worklight/worklight.js:3320
07-03 13:07:05.463: D/CordovaLog(4214): file:///data/data/com.pdf/files/www/default/worklight/worklight.js: Line 3320 : Uncaught TypeError: Cannot read property 'isSuccessful' of undefined
07-03 13:07:05.471: E/Web Console(4214): Uncaught TypeError: Cannot read property 'isSuccessful' of undefined at file:///data/data/com.pdf/files/www/default/worklight/worklight.js:3320
I need to know, how to make it reachable in the successHandler. Thanks in advance.
The problem is with parsing the JSON data, based on the following answer, I have converted the Json data to string using JSON.stringify(), so that the string can successfully reach the successHandler inside the handler i am using JSON.parse() to convert the string to JSON for use.