I'm currently having problems with getting my Discord bot, RoboMiku, to go online.
There were 2 main problems I had, but they're fixed. But, I have a new problem.
1. Bot not going online
My problems with deploying her are gone, but now she doesn't go online. It might have to do with the fact that when I click on the domain created, it brings an error up. Here is the link.
If it helps, my code on GitHub is here.
Key-value pairs should not have trailing commas in JSON files. So, removing the trailing comma from start script will solve your issue.
{
"name": "robomiku",
"description": "A simple bot that is currently in development.",
"version": "0.0.6a",
"main": "bot.js",
"scripts": {
"start": "node bot.js"
},
"dependencies": {
"discord.js": "^11.5.1"
}
}
Fixing this problem should also fix your dyno issue.
Related
If I have vscode open for several hours but remain offline, it seems the schema cache automatically clears and I get errors like this:
Problems loading reference 'https://json.schemastore.org/tsconfig': Unable to load schema from 'https://json.schemastore.org/tsconfig': getaddrinfo EAI_AGAIN json.schemastore.org.
Is there a way to PREVENT schema cache from being cleared when offline? Two specific situations are
vscode is open throughout the transition from online to offline
vscode is opened while offline
I know it could be done manually (c.f. this answer), e.g., by copying a a version for offline use and specifying in settings.json
"json.schemas": [
{
"fileMatch": [
"tsconfig.json"
],
"url": "./tsconfig.schema.json"
}
],
but of course I'd rather the existing schema cache feature worked sensibly - and maybe it does but requires a switch to do so?
I have a service that request all our repositories then for each repository, i'm getting all the csproj and vbproj in the repository.
My problem is that it return 2 versions of the same file!
Ex:
A project has been created that way => MYPROJECT.csproj and commited,
then renamed to MyProject.csproj and commited.
But the CodeSearch Api is returning both file!
How can i know which one is the right one ?
Documentation doesn't seems to mention it or I'm not understanding which properties I need to send or which properties is telling me that it's an old file.
Documentation
https://learn.microsoft.com/en-us/rest/api/azure/devops/search/code%20search%20results/fetch%20code%20search%20results?view=azure-devops-rest-5.1
URL
https://almsearch.dev.azure.com/MyOrganisation/MyProject/_apis/search/codesearchresults?api-version=5.1-preview.1
BODY
{
'searchText': 'ext:csproj',
'includeFacets': false,
'$skip': 0,
'$top': 1000,
'filters': {
'Project': ['MyProject']
},
'$orderBy': [{
'field': 'filename',
'sortOrder': 'ASC'
}]
}
When I do the same research directly on DevOps, I see this flag over the old file
So there must be a way to tell if it's an old file!
How can I get it ?
I could reproduce this issue on my side. In Tfvc Repo, the code search result will return all versions of the file.
Based on my test, the difference between them is versions -> changeid.
Generally changeid is incremental, so you could judge the old and new versions according to the value of changeid. This is a workaround.
On the other hand, I will help you to report this issue on our Developer Community forum, and after confirmation by our engineer, this issue will be reported to the product team. The product team would provide the updates if they view it.
I got the same message (I renamed file using git mv command):
I got this message after committing renamed file and when I clicked on search button. However, when I refreshed page, warning goes away:
For me it looks like search on web based on some kind of locally cached indexes, but it is aware that some file was changed. Thus you won't be able to achieve this via REST API call.
Today I was surprised to find an "Enable Experiments" option under VSCode's Workbench settings, turned on by default.
The setting's description is "Fetches experiments to run from a Microsoft online service" which seems rather vague to me. I tried googling this but didn't find any clear answers.
So, does anybody know what those "experiments" are and if it would probably be better to turn this off?
This is one of the case where using open-source software is a good idea. Because the source code of visual studio code is published in https://github.com/Microsoft/vscode. We could try to search in where the code would be used.
First, we could try to search the string Enable Experiments. And see, to which action the option is tied to. From there, I see that, the file src/vs/workbench/contrib/experiments/node/experimentService.ts is using it. Specifically, when trying to load an experiment in line 173
if (!product.experimentsUrl || this.configurationService.getValue('workbench.enableExperiments') === false) {
We see that, the code would check for "experiment URL". this could be seen in product.json which #Joey mentioned in the comment. In my case, the text looks like this.
"experimentsUrl": "https://az764295.vo.msecnd.net/experiments/vscode-experiments.json",
From there, we could see the content of the JSON file by making a GET request to that URL. And, it returns this (at least, at the time I make the request)
{
"experiments": [
{
"id": "cdias.searchForAzure",
"enabled": true,
"action": {
"type": "ExtensionSearchResults",
"properties": {
"searchText": "azure",
"preferredResults": [
"ms-vscode.vscode-node-azure-pack",
"ms-azuretools.vscode-azureappservice",
"ms-azuretools.vscode-azurestorage",
"ms-azuretools.vscode-cosmosdb"
]
}
}
}
]
}
Based on the response, I could see that, it try to alter my search result if I search using "azure" key word. Which I tried, and the search result shows the 4 items there on top of the result search.
As to whether to disable it or not. On safe side (if you don't want for it to alter your experience using vscode) I think you would want to disable it. But, I don't think microsoft would do something crazy.
I just noticed this one and was curious about it as well. A search through the VS Code release notes finds one reference to it in July 2018. workbench.enableExperiments is listed as one of the settings for VS Code's "Offline mode": https://code.visualstudio.com/updates/v1_26#_offline-mode
The description of offline mode suggests that this settings is for "A/B experiments":
To support this offline mode, we have added new settings to turn off features such as automatic extension update checking, querying settings for A/B experiments, and fetching of online data for auto-completions.
As mentioned by others, the source code for VS Code shows this setting being used in experimentService.ts: https://github.com/microsoft/vscode/blob/93bb67d7efb669b4d1a7e40cd299bfefe5e85574/src/vs/workbench/contrib/experiments/common/experimentService.ts
If you look at the code of experimentService.ts, the stuff it's fetching seems to be related to extension recommendations, notifications about new features, and similar things. So it looks like the experiment service is for fetching data to do A/B testing of feature and extension recommendations to users.
I'm currently using GitHub Milestones, to track Issues that I want included in a Release...
Now, that I want to push a new Release, I can't see anyway of linking Issues to a Release (or for that matter, Milestones to a Release).
I was expecting that I could use the GitHub's Releases as a Changelog, so that users could easily see what Issues/Enhancements were fixed/included in a release.
e.g. Version-1.123 contained fixes for Issues #111, #222 and #333.
Does this functionality exist?
N.B.
I couldn't find anything under the GitHub Developer API
Also, this is the first Release.
You can have markdown in the body field of the request.
POST /repos/:owner/:repo/releases
{
"tag_name": "v1.0.0",
"target_commitish": "master",
"name": "v1.0.0",
"body": "* Fixed #1 \r\n * Fixed #2 ",
"draft": false,
"prerelease": false
}
Will look like:
I guess that's what you want.
Currently when a background process always becomes inactive, even when i'm waiting for data from a websocket. Is there a way to circumvent this? The documentation is not clear at all in this department (old documentation etc.). What is the 'new' and correct way to do this?
My manifest file:
{
"name": "Media 5",
"manifest_version": 2,
"description": "Html5 media center app for Chrome",
"version": "0.1",
"app": {
"background": {
"persistent": true,
"scripts": ["background.js"]
}
},
"icons": { "16": "small_icon.png", "128": "big_icon.png" },
"sandbox": {
"pages": ["sandbox.html"]
},
"permissions": [
"unlimitedStorage",
"fullscreen",
"notifications",
"webview"
]
}
There are lots of ways to prevent your event page from getting unloaded, including those listed here: http://developer.chrome.com/extensions/event_pages.html. Give one of those a try. Open a message port, or set a chrome.alarms alarm for about a 5-second interval. I don't believe it's documented behavior, but event pages are typically unloaded after 10 seconds of inactivity, so the alarm ought to keep you alive.
I've filed a bug about this; it might be smarter for us to avoid unloading if you're using websockets.
Another thing that keeps packaged apps alive is having an active callback. So, for example, you could use setTimeout with a timeout value of say 5 to ensure you app remains alive. This is only a workaround though, and there should be a better way to reconcile lifetime of websockets and packaged apps.
There is a Chromium bug (https://code.google.com/p/chromium/issues/detail?id=204573) tracking this issue.
As an FYI (because this is confusing), the "persistent": true line is currently ignored by Chrome. Packaged Apps (v2) are always set to "persistent": false.