podchat-browser 12.5.2-snapshot.3 → 12.5.2-snapshot.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented here.
4
4
  to see complete list of changelog please visit [ChangeLog](http://gp.fanapsoft.ir/pod/pod-basic-sdk/chat-js-browser-sdk/-/blob/master/changelog.md)
5
5
 
6
+ ## [12.5.2-snapshot.4] - 2022-05-29
7
+ ### Changed
8
+ - Improved call error logs in Sentry
9
+
10
+ ## [12.5.2-snapshot.3] - 2022-05-24
11
+ ### Changed
12
+ - Update sentry url
13
+
14
+
6
15
  ## [12.5.2-snapshot.2] - 2022-05-24
7
16
  ### Changed
8
17
  - Update async package
@@ -56718,7 +56718,14 @@ WildEmitter.mixin(WildEmitter);
56718
56718
  options.sendSource = 'screen';
56719
56719
  resolve(options);
56720
56720
  }).catch(function (error) {
56721
- console.error("[SDK][navigator.mediaDevices.getDisplayMedia]", error);
56721
+ let errorString = "[SDK][navigator.mediaDevices.getDisplayMedia]" + JSON.stringify(error)
56722
+ console.error(errorString);
56723
+ chatEvents.fireEvent('callEvents', {
56724
+ type: 'CALL_ERROR',
56725
+ code: 7000,
56726
+ message: errorString,
56727
+ environmentDetails: getSDKCallDetails()
56728
+ });
56722
56729
  explainUserMediaError(error, 'video', 'screen');
56723
56730
  //resolve(options);
56724
56731
  });
@@ -56758,7 +56765,14 @@ WildEmitter.mixin(WildEmitter);
56758
56765
  config.state = peerStates.CONNECTING;
56759
56766
  config.peer = new KurentoUtils.WebRtcPeer[WebRtcFunction](options, function (err) {
56760
56767
  if (err) {
56761
- console.error("[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType));
56768
+ let errorString = "[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType);
56769
+ console.error(errorString);
56770
+ chatEvents.fireEvent('callEvents', {
56771
+ type: 'CALL_ERROR',
56772
+ code: 7000,
56773
+ message: errorString,
56774
+ environmentDetails: getSDKCallDetails()
56775
+ });
56762
56776
  return;
56763
56777
  }
56764
56778
 
@@ -56780,7 +56794,14 @@ WildEmitter.mixin(WildEmitter);
56780
56794
  } else {
56781
56795
  config.peer.generateOffer((err, sdpOffer) => {
56782
56796
  if (err) {
56783
- console.error("[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err);
56797
+ let errorString = "[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err
56798
+ console.error(errorString);
56799
+ chatEvents.fireEvent('callEvents', {
56800
+ type: 'CALL_ERROR',
56801
+ code: 7000,
56802
+ message: errorString,
56803
+ environmentDetails: getSDKCallDetails()
56804
+ });
56784
56805
  return;
56785
56806
  }
56786
56807
  manager.sendSDPOfferRequestMessage(sdpOffer, 1);
@@ -57993,12 +58014,12 @@ WildEmitter.mixin(WildEmitter);
57993
58014
  },
57994
58015
 
57995
58016
  explainUserMediaError = function (err, deviceType, deviceSource) {
57996
- chatEvents.fireEvent('callEvents', {
58017
+ /*chatEvents.fireEvent('callEvents', {
57997
58018
  type: 'CALL_ERROR',
57998
58019
  code: 7000,
57999
58020
  message: err,
58000
58021
  environmentDetails: getSDKCallDetails()
58001
- });
58022
+ });*/
58002
58023
 
58003
58024
  const n = err.name;
58004
58025
  if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
@@ -74881,6 +74902,7 @@ WildEmitter.mixin(WildEmitter);
74881
74902
  this.uniqueId = error.uniqueId ? error.uniqueId : '';
74882
74903
  this.token = token;
74883
74904
  this.error = JSON.stringify((error.error ? error.error : error));
74905
+ this.environmentDetails = error.environmentDetails
74884
74906
  };
74885
74907
 
74886
74908
  this.updateToken = function (newToken) {
@@ -74917,7 +74939,22 @@ WildEmitter.mixin(WildEmitter);
74917
74939
  Sentry.setExtra('errorCode', err.code);
74918
74940
  Sentry.setExtra('uniqueId', err.uniqueId);
74919
74941
  Sentry.setExtra('token', err.token);
74942
+ Sentry.setExtra('SDKParams', {
74943
+ platformHost: params.platformHost,
74944
+ podSpaceFileServer: params.podSpaceFileServer,
74945
+ socketAddress: params.socketAddress,
74946
+ ssoHost: params.ssoHost,
74947
+ typeCode: params.typeCode,
74948
+ serverName: params.serverName,
74949
+ callRequestTimeout: params.callRequestTimeout,
74950
+ asyncRequestTimeout: params.asyncRequestTimeout,
74951
+ httpUploadRequestTimeout: params.httpUploadRequestTimeout,
74952
+ callOptions: params.callOptions
74953
+ });
74954
+
74920
74955
  Sentry.setTag('Error code:', (err.code ? err.code : ''))
74956
+ if(err.environmentDetails)
74957
+ Sentry.setExtra("environmentDetails", err.environmentDetails)
74921
74958
  Sentry.captureException(err.error, {
74922
74959
  logger: eventName
74923
74960
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "podchat-browser",
3
- "version": "12.5.2-snapshot.3",
3
+ "version": "12.5.2-snapshot.4",
4
4
  "description": "Javascript SDK to use POD's Chat Service - Browser Only",
5
5
  "main": "./src/chat.js",
6
6
  "scripts": {
@@ -473,7 +473,14 @@
473
473
  options.sendSource = 'screen';
474
474
  resolve(options);
475
475
  }).catch(function (error) {
476
- console.error("[SDK][navigator.mediaDevices.getDisplayMedia]", error);
476
+ let errorString = "[SDK][navigator.mediaDevices.getDisplayMedia]" + JSON.stringify(error)
477
+ console.error(errorString);
478
+ chatEvents.fireEvent('callEvents', {
479
+ type: 'CALL_ERROR',
480
+ code: 7000,
481
+ message: errorString,
482
+ environmentDetails: getSDKCallDetails()
483
+ });
477
484
  explainUserMediaError(error, 'video', 'screen');
478
485
  //resolve(options);
479
486
  });
@@ -513,7 +520,14 @@
513
520
  config.state = peerStates.CONNECTING;
514
521
  config.peer = new KurentoUtils.WebRtcPeer[WebRtcFunction](options, function (err) {
515
522
  if (err) {
516
- console.error("[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType));
523
+ let errorString = "[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType);
524
+ console.error(errorString);
525
+ chatEvents.fireEvent('callEvents', {
526
+ type: 'CALL_ERROR',
527
+ code: 7000,
528
+ message: errorString,
529
+ environmentDetails: getSDKCallDetails()
530
+ });
517
531
  return;
518
532
  }
519
533
 
@@ -535,7 +549,14 @@
535
549
  } else {
536
550
  config.peer.generateOffer((err, sdpOffer) => {
537
551
  if (err) {
538
- console.error("[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err);
552
+ let errorString = "[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err
553
+ console.error(errorString);
554
+ chatEvents.fireEvent('callEvents', {
555
+ type: 'CALL_ERROR',
556
+ code: 7000,
557
+ message: errorString,
558
+ environmentDetails: getSDKCallDetails()
559
+ });
539
560
  return;
540
561
  }
541
562
  manager.sendSDPOfferRequestMessage(sdpOffer, 1);
@@ -1748,12 +1769,12 @@
1748
1769
  },
1749
1770
 
1750
1771
  explainUserMediaError = function (err, deviceType, deviceSource) {
1751
- chatEvents.fireEvent('callEvents', {
1772
+ /*chatEvents.fireEvent('callEvents', {
1752
1773
  type: 'CALL_ERROR',
1753
1774
  code: 7000,
1754
1775
  message: err,
1755
1776
  environmentDetails: getSDKCallDetails()
1756
- });
1777
+ });*/
1757
1778
 
1758
1779
  const n = err.name;
1759
1780
  if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
@@ -36,6 +36,7 @@
36
36
  this.uniqueId = error.uniqueId ? error.uniqueId : '';
37
37
  this.token = token;
38
38
  this.error = JSON.stringify((error.error ? error.error : error));
39
+ this.environmentDetails = error.environmentDetails
39
40
  };
40
41
 
41
42
  this.updateToken = function (newToken) {
@@ -72,7 +73,22 @@
72
73
  Sentry.setExtra('errorCode', err.code);
73
74
  Sentry.setExtra('uniqueId', err.uniqueId);
74
75
  Sentry.setExtra('token', err.token);
76
+ Sentry.setExtra('SDKParams', {
77
+ platformHost: params.platformHost,
78
+ podSpaceFileServer: params.podSpaceFileServer,
79
+ socketAddress: params.socketAddress,
80
+ ssoHost: params.ssoHost,
81
+ typeCode: params.typeCode,
82
+ serverName: params.serverName,
83
+ callRequestTimeout: params.callRequestTimeout,
84
+ asyncRequestTimeout: params.asyncRequestTimeout,
85
+ httpUploadRequestTimeout: params.httpUploadRequestTimeout,
86
+ callOptions: params.callOptions
87
+ });
88
+
75
89
  Sentry.setTag('Error code:', (err.code ? err.code : ''))
90
+ if(err.environmentDetails)
91
+ Sentry.setExtra("environmentDetails", err.environmentDetails)
76
92
  Sentry.captureException(err.error, {
77
93
  logger: eventName
78
94
  });