Troubleshooting
How to debug mini apps?
If you don't see ads, in most cases you will see detailed error in console. In order to open the console:
- Check instruction from telegram about Debug Mode
- If your app only available from mobile try to use a lightweight console like Eruda
Common mistakes
-
Wrong
Web app urlforblockId. You will see error in console like on image below and error in network tab. Check create platform guide for details. -
Launching app in a browser environment. We expect that you open your app inside Telegram. Also, remember to remove or set to
falsethedebugparameter when releasing to production.
Status Handling
If everything is fine
this.resolve({
watchedToEnd: true,
error: false,
description: '',
status: 'closed'
});
If there's a request error
this.reject({
watchedToEnd: false,
error: true,
description: error,
status: 'error'
});
If the previous request is still in progress
return Promise.reject({
watchedToEnd: false,
status: 'loading',
error: true,
description: 'Modal is already loading'
});