Getting transport error while watching the document in stitch - mongodb

When I watch the certain ids in the collection using MongoDB watch I am getting error
ERROR Error: Uncaught (in promise): e: (TRANSPORT_ERROR): the request transport encountered an error communicating with Stitch: event source failed to open and will not reconnect; check network log for more details
e: (TRANSPORT_ERROR): the request transport encountered an error communicating with Stitch: event source failed to open and will not reconnect; check network log for more details
It was working till yesterday it started from today
const db = mongoClient.db(environment.databaseName);
const comments = db.collection('collectionName');
this.changeStream = await comments.watch(ids);
this.changeStream.onNext((event) => {
console.log('Watched document changed:', event);
this.fetchData();
});
I expect that whenever the document is changed in the list of ids. Change event should trigger.

This indicates that your app is unable to communicate with the stitch backend, probably because of not internet or poor network

Related

Not able to run azure logic apps locally using VScode and Azurite

I am using VSCode to create and test my logic apps locally. I have created a simple HTTP trigger and response for it. I have installed all the components and versions correctly. I am getting below error when I run my logic apps,
**Workflow Error: operationName='WorkflowDefinitionProvider.ProcessWorkflow', message='Workflow 'test-1' validate and create workflow failed, the error is 'One or more errors occurred. (Unexpected HTTP status code 'NotFound'.) (Unexpected HTTP status code 'NotFound'.)'', exception='System.AggregateException: One or more errors occurred. (Unexpected HTTP status code 'NotFound'.) (Unexpected HTTP status code 'NotFound'.)
[2022-05-03T02:52:23.134Z] ---> Microsoft.WindowsAzure.Storage.StorageException: Unexpected HTTP status code 'NotFound'.
[2022-05-03T02:52:23.136Z] ---> System.Net.WebException: The remote server returned an error: (404) Not Found.**
It is also giving me below error in the logs,
**ErrorCode:
[2022-05-03T03:08:44.593Z] ', extensionVersion='1.0.0.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.
[2022-05-03T03:08:44.595Z] The listener for function 'Functions.WorkflowDispatcher' was unable to start.
[2022-05-03T03:08:44.595Z] The listener for function 'Functions.WorkflowDispatcher' was unable to start. Microsoft.WindowsAzure.ResourceStack: Unexpected HTTP status code 'NotFound'. The remote server returned an error: (404) Not Found.**
The process to test that I am following,
Start azurite in VSCode
and then Execute function - func host start
Anyone has any clue or faced similar problems? I am using logic apps first time.
To be able to test HTTP triggers locally you need to
"To locally run webhook-based triggers and actions, such as the built-in HTTP Webhook trigger, in Visual Studio Code, you need to set up forwarding for the callback URL."
https://learn.microsoft.com/en-us/azure/logic-apps/create-single-tenant-workflows-visual-studio-code

zoom swift sdk crashes after connecting to a meeting

i am trying run the zoom swiftdemo app referenced in their Github repo
but i keep getting this error whenever i connected to a meeting
ZoomiOSSDKDemo[1944:343363] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xe10f, name = '.1516928314.rpc'
See /usr/include/servers/bootstrap_defs.h for the error codes.
I can connect to a meeting but it crashes a few second after connecting. What does the error message mean and how can i fix this?

PWA not working correctly offline. Uncaught (in promise) TypeError: Failed to fetch

I am trying to convert a simple webpage I have into a PWA in case the site it uses goes down.
I think I have done the majority of the work. The page is installable on my phone and passes all the Chrome lighthouse tests. But I get the following warning,
Web app manifest meets the installability requirements
Warnings: Page does not work offline. The page will not be regarded as installable after Chrome 93, stable release August 2021.
I also get the following warning and error in console,
The FetchEvent for "https://dannyj1984.github.io/index.html" resulted in a network error response: the promise was rejected.
Promise.then (async)
(anonymous) # serviceWorker.js:30
serviceWorker.js:1 Uncaught (in promise) TypeError: Failed to fetch
There is then a warning saying the site cannot be installed as does not work offline. I have read the chrome dev article which says from the chrome release in Aug21 apps that dont work offline wont be installable. But I am stuck on which part of my fetch is causing an issue. The code in my service worker is,
const TGAbxApp = "TG-ABX-App-v1"
const assets = [
//paths to files to add
]
self.addEventListener("install", installEvent => {
installEvent.waitUntil(
caches.open(TGAbxApp).then(cache => {
cache.addAll(assets)
})
)
})
self.addEventListener('fetch', function(event) {
event.respondWith(
caches.match(event.request)
.then(function(response) {
// Cache hit - return response
if (response) {
return response;
}
return fetch(event.request);
}
)
);
});
The above code for the fetch part of the service worker I took from Google and as I understand it, it first checks if there is data in the cache stored on install, if not it will request it from the network.
https://developer.chrome.com/blog/improved-pwa-offline-detection/
From Chrome 89 March 2021, it gives a warning if this check does not pass:
The installed service worker fetch event returns an HTTP 200 status code (indicating a successful fetch) in simulated offline mode.
So, in your case, the service worker should return a cached 'index.html' when fetch(event.request) is failed.
I've had the same problem. I re enabled the cache through the developer console->network. fixed

Decoding halted because of invalid data in the stream

I am using Workstation.UaClient 2.0
when i try to connect to
opc.tcp://My-PC:53530/OPCUA/SimulationServer
i am able to successfully connect to prosys OPC UA simulation server.
But when i try to create subscription,
In this line
BrowseResponse browseResponse = await channel.BrowseAsync(browseRequest);
it throw exception
Decoding halted because of invalid data in the stream.
Same code works with kepserver.
Please help to fix this issue.

Message hub service going down everyday

Iam using bluemix message hub service in my node app which is in production.Now we have run in to an issue that message hub service goes down everyday and the app needs to be restarted then.This cant be done so.
We are getting the following logs
2016-10-16T17:41:42.66+0100 [App/0] OUT Unable to consume topic: Error: Request returned
status code 404 but it was not in the accepted list. The REST API responded with the
following message: Consumer instance not found.
2016-10-16T17:41:46.66+0100 [App/0] OUT got error: { [Error: Request returned status code
404 but it was not in the accepted list. The REST API responded with the following message:
Consumer instance not found.] statusCode: 404, errorCode: 40403 }
Is there any way that we can handle this.This is failing over here
run: function(callback) {
var that = this;
consumerInstance.get(topic)
.then(function(data) {
that.consume(data);
return callback();
})
.fail(function(error) {
console.log("got error: ", error);
return callback(error);
})
}
This is the code which we are using for reference
https://github.com/ibm-cds-labs/Spark-Twitter-Watson-Dashboard/blob/master/server/messageHubBridge.js?s_tact=C43301PW
Any thoughts on how to resolve this issue.
Thanks,
Harish.
Hi the REST endpoint for MessageHub gets recycled every 24 hours.
Clients are expected to handle this by creating a new consumer instance.
HTH,
Edo
As per the Message Hub documentation, the REST service restarts daily. After the REST API has restarted, you will have to recreate your Kafka consumer instances.
Thanks,
Simon.