Getting Supabase Edge Function's bundled script - telegram-bot

I am using Supabase's Edge Function to create a simple telegram bot (based on Webhook's). When I am deploying the function to Supabase and then invoking it through Telegram, I am getting the following error message in the log:
How can I go about debugging this error? Can I get the bundled source code of the edge function so that I can make changes to my script to correct the same?

Related

getDevicePushTokenAsync error on bare workflow

I implemented push notification on managed workflow which is working properly but when I eject from managed workflow, I am getting error at line
pushToken = (await Notifications.getExpoPushTokenAsync()).data;
Error: Encountered an exception while calling native method: Exception occurred while executing exported method getDevicePushTokenAsync on module ExpoPushTokenManager: Default FirebaseApp is not initialized in this process com.luciajane.taskuser. Make sure to call FirebaseApp.initializeApp(Context) first.
I passed experienceId but still getting error?
pushToken = (await Notifications.getExpoPushTokenAsync({experienceId: "#luciajane/task-user"})).data;
I found reason. You have to setup by making new project on firebase then download google-services.json file and add that to your expo project. As expo mentioned Firebase Cloud Messaging is required for all managed and bare workflow Android apps made with Expo.For setup follow this link https://docs.expo.io/push-notifications/using-fcm/

Adobe analytics with vue js adding external script

Im struggling to add adobe analytics external scripts to my Vue js project. The client uses Adobe analytics and im battling to add it to the project without the project complaining.
The external adobe script looks like the following:
//assets.adobedtm.com/file.min.js with async
Then it is required that you end it by adding the following just before the closing body tag:
<script type="text/javascript">_satellite.pageBottom();</script>
When the project starts it complains in console that $ is not defined because it is defined in webpack when i start the project and im guessing its not finding the alias.
This is the error:
VM29714:3 Uncaught ReferenceError: $ is not defined
Then further down it complains that it doesnt know what _satellite is:
login:54 Uncaught ReferenceError: _satellite is not defined
I just need the scripts and satellite close to be added to the project, the rest will work once these are added.
Ive tried added the scripts by injecting them into the head tag on runtime but that also doesnt work.
If you are implementing Adobe DTM, you cannot inject the header script dynamically. It must be placed directly on the page without async or deferred attributes.
If you are implementing Adobe Launch, you can inject the header script dynamically and asynchronously. And if you do this, you do not include the footer (_satellite.pageBottom()) code.
Your script example isn't explicit, but the .min portion implies you are using Adobe Launch.
VM29714:3 Uncaught ReferenceError: $ is not defined
This is not directly related to either Adobe DTM or Launch. You may possibly have some other script or code block deployed inside the DTM or Launch interface that references $, but that's a separate issue to work out. Yes, it may be coming from a DTM or Launch script according to the js console, but keep in mind that DTM/Launch is a tag manager. It hosts and deploys other tags/scripts. So you need to do some digging to see which tag/script from which Rule references it. Start by looking at the stack trace to find out where it's coming from.

Angular 5 / Sentry error reporting shows error source reference in bundled js

I have applied Sentry.io error reporting in an Angular 5 project using Raven-js. Everything works fine and I get the error reports.
The problem is that the reported error location is provided using the bundle.js file references which is very hard to find in the actual project.
For e.g.
TypeError: Cannot read property 'id' of undefined
at e.logOffline (/mem/main.f858f9330b4c0ee7c38e.bundle.js:1:26440)
at e.phoneOffline (/mem/main.f858f9330b4c0ee7c38e.bundle.js:1:25883)
at t.handleEvent_12 (/mem/main.f858f9330b4c0ee7c38e.bundle.js:1:488537)
at HTMLAnchorElement.<anonymous> (/mem/vendor.f8004cbd231f87b295e2.bundle.js:1:311586)
at HTMLAnchorElement.r (/mem/vendor.f8004cbd231f87b295e2.bundle.js:1:666890)
Now this reference is not useful to locate the error.
Is there something that I missed in the sentry setup or this is how it actually shows the error?
Seems like Sentry can't find your source maps. If your site is public, Sentry will try to get the spurce maps automatically. Otherwise you can upload the source maps yourself.
https://docs.sentry.io/clients/javascript/sourcemaps/
The usage of source maps works out of the box for a deployed app. Sentry tries to fetch the source maps through the public internet and thus cannot fetch them on localhost.
If your source maps aren't public (e.g. out of security concerns), then you need to upload them manually like described here: https://docs.sentry.io/platforms/javascript/sourcemaps/availability/#uploading-source-maps-to-sentry .

ejabberd hook execution error while trying building a message receipts module

I am getting an error while trying to return a receipt message from server to acknowledge message received at server for which I am using a non official module (mod_stanza_ack) and ejabberd 15.07.
I have compiled and configured it successfully too, but it's giving the following error during ejabberd hook execution:
#ejabberd_hooks:run_fold1:371 {undef,[{mod_send_receipt,on_user_send_packet,[{xmlel,<<"message">>,[{<<"id">>,<<"6uAAO-218">>}.....
undef means the function mod_send_receipt:on_user_send_packet.
I see possible reason for this:
source file is not compiled (due to syntax error for example)
or the resulting .beam file is not in your Erlang VM code path
or the function is actually not defined in your module
You need to fix your module accordingly or put the .beam file in the right place.

EPIPE error uploading img to s3 using imagesquish

I've been testing imagesquish for a while and I can't seem to have it working.
It works with node.js, forever, express and knox and basically does image processing on the fly.
I'm trying to call an image on a server, it resizes, crops or whatever and then uploads to s3.
I've had permission issues but after creating a new s3 bucket, it seems I made some progress but then, the image doesn't get uploaded and I can't get any error.
I managed to go through it's code and go all the way to exports.uploadImage that would call img.toBuffer but apparently it doesn't get called.
At the end, I get the error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:904:11)
at Object.afterWrite (net.js:720:19)
error: Forever detected script exited with code: 8
error: Script restart attempt #1
I need some help on this. Does anybody have any idea?
Luis. Not sure if you're still interested in an answer to this. I'm the author of ImageSquish. From the information you provide, this sounds like img.toBuffer is failing which is usually because graphicsmagick is not installed. The latest version of ImageSquish checks for the existence of this library on startup (see https://github.com/dmcquay/imagesquish/blob/master/check.js).
You might also find it easier to try it out using docker (https://registry.hub.docker.com/u/dmcquay/imagesquish/) so you don't have to worry about installing anything.
If this doesn't resolve your problem, you can find me via irc on freenode #imagesquish.