text:
Testing in ropsten network (in infura) with truffle.js gives me this error

root@ubuntu-4gb-nyc3-01:~# truffle migrate --network ropsten (node:14686) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: this.provider.sendAsync is not a function (node:14686) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Using network 'ropsten'.
Running migration: 1_initial_migration.js
**After that it exits to

root@ubuntu-4gb-nyc3-01:~#

without running 2_deploy_contracts.js**
My truffle.js looks like the following :
var bip39 = require("bip39");
var hdkey = require('ethereumjs-wallet/hdkey');
var ProviderEngine = require("web3-provider-engine");
var WalletSubprovider = require('web3-provider-engine/subproviders/wallet.js');
var Web3Subprovider = require("web3-provider-engine/subproviders/web3.js");
var Web3 = require("web3");
// Get our mnemonic and create an hdwallet
var mnemonic = "twelve words we can find in metamask settings reveal seed words blabla";
var hdwallet = hdkey.fromMasterSeed(bip39.mnemonicToSeed(mnemonic));
// Get the first account using the standard hd path.
var wallet_hdpath = "m/44'/60'/0'/0/";
var wallet = hdwallet.derivePath(wallet_hdpath + "0").getWallet();
var address = "0x" + wallet.getAddress().toString("hex");
console.log(address);
var providerUrl = "https://ropsten.infura.io/mytoken";
var engine = new ProviderEngine();
engine.addProvider(new WalletSubprovider(wallet, {}));
engine.addProvider(new Web3Subprovider(new Web3.providers.HttpProvider(providerUrl)));
engine.start(); // Required by the provider engine.
module.exports = {
  networks: {
    ropsten: {
      network_id: 3,    // Official ropsten network id
      provider: engine, // Use our custom provider
      from: address,     // Use the address we derived
      gas: 3000000
    }
  },
  rpc: {
    // Use the default host and port when not using ropsten
    host: "my-server-ip-goes-here",
    port: 8545
  }
  };

My 2_deploy_contracts.js looks like the following ;
var SafeMath = artifacts.require("./SafeMath.sol");
var RedPillToken = artifacts.require("./MyToken.sol");
var Crowdsale = artifacts.require("./Crowdsale.sol");

module.exports = function(deployer) {

	var owner = web3.eth.accounts[0];
	var wallet = web3.eth.accounts[1];

	console.log("Owner address: " + owner);
	console.log("Wallet address: " + wallet);

	deployer.deploy(SafeMath, { from: owner });
	deployer.link(SafeMath,MyToken);
	return deployer.deploy(MyToken, { from: owner }).then(function() {
		console.log("MyToken address: " + MyToken.address);
		return deployer.deploy(Crowdsale, MyToken.address, wallet, { from: owner }).then(function() {
			console.log("Crowdsale address: " + Crowdsale.address);
			return MyToken.deployed().then(function(coin) {
				return coin.owner.call().then(function(owner) {
					console.log("MyToken owner : " + owner);
					return coin.transferOwnership(Crowdsale.address, {from: owner}).then(function(txn) {
						console.log("MyToken owner was changed: " + Crowdsale.address);
					});
				})
			});
		});
	});
};

Where will I find this.provider.sendAsync function?
I m using node : v8.2.1 and Ubuntu 16.04
I m really stuck with this. Any help would be appreciated. Thanks
N.B. I created a 12 word mnemonic from metamask plugin from chrome. and then tried to deploy the conract in ropsten again after updating the truffle.js with the new mnemonic. Again the same error :UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: this.provider.sendAsync is not a function (node:22993) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

You're most likely following a slightly outdated method of creating a custom provider engine using an older version of web3-provider-engine, such as what truffle-hdwallet-provider does.
Instead, you'll want to make use of new Subproviders such as fetch instead of Web3Subprovider and Web3.providers.HttpProvider:
const ProviderEngine = require("web3-provider-engine");
const CacheSubprovider = require("web3-provider-engine/subproviders/cache.js");
const FilterSubprovider = require("web3-provider-engine/subproviders/filters.js");
const WalletSubprovider = require("web3-provider-engine/subproviders/wallet.js");
const NonceSubprovider = require("web3-provider-engine/subproviders/nonce-tracker.js");
const FetchSubprovider = require("web3-provider-engine/subproviders/fetch.js");

const engine = new ProviderEngine();
engine.addProvider(new CacheSubprovider());
engine.addProvider(new FilterSubprovider());
engine.addProvider(new NonceSubprovider());
engine.addProvider(new WalletSubprovider(wallet, {}));
engine.addProvider(new FetchSubprovider({ rpcUrl: provider_url }));

@gerstaro let me know if you're still encountering issues

authors: gerstaro kumavis pheuter

repo: MetaMask/provider-engine


text:
[DO NOT MERGE] Apply superstruct v2.0.3-1

@metamaskbot publish-preview

source: gharchive/pull-request

repo: MetaMask/utils

license: ISC

license_type: permissive

license_source: github-api


text:
Installed HackBGRT, shows Windows logo instead of custom logo

I have an ASUS Vivobook S551LB with Windows 10. I was able to get it working like 4 months ago but for some reason in August it shows the Windows logo instead of the custom logo. Can somebody fix it?

Please try the new release. In case of problems, change the last line in config.txt to debug=1, reinstall and see what happens then. Screen contents and setup.log are needed for any further assistance.

Closing bugs from obsolete versions. Please reopen if this is still valid for the most recent version.

source: gharchive/issue

authors: GuestTheGamer Metabolix

repo: Metabolix/HackBGRT

license: mit

license_source: bigquery


text:
Minor: plugin shouldn't write null for unused fields in rules

It's allowed by felix but the intention was to only supply the things that we want to match on.  If nothing else it keeps the data small.
{"ip_version": 4, "dst_net": "0.0.0.0/0", "dst_tag": null, "dst_ports": null}

                                                                                Thanks, I'll fix this on Tuesday if not sooner.

Since it was trivial, and I was making a fix on the relevant line of code, I fixed this on my branch.

Fixed in b48e350d373d6e0ad08d50de57723681921354a0.

authors: fasaxc neiljerram

repo: Metaswitch/calico


text:
RHEL 6.5 install issues.

suid isn't available on RHEL 6.5. I removed it (do we need to run it as etcd?). Also, the directory give is wrong. My /etc/init/etcd.conf on control node is (also nee similar changes for compute):
[root@calico-rh04 ~]# cat /etc/init/etcd.conf
description "etcd"
author "etcd maintainers"

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn

script

        env ETCD_DATA_DIR=/var/lib/etcd
        export ETCD_DATA_DIR

        exec /usr/local/bin/etcd --name  calico-rh04                                                        \
                           --advertise-client-urls "http://172.18.203.104:2379,http://172.18.203.104:4001" \
                           --listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001              \
                           --listen-peer-urls http://0.0.0.0:2380                                    \
                           --initial-advertise-peer-urls "http://172.18.203.104:2380"                \
                           --initial-cluster-token calicorh6                                         \
                           --initial-cluster calico-rh04=http://172.18.203.104:2380                  \
                           --initial-cluster-state new
end script

I can't install libffi-devel - its not available from the repos setup so far. I tried rpmforge ( https://gist.github.com/rderoldan1/5920539 ) with el5 replaced with el6 and it still failed.

Ugh.
We don't need to run etcd as a non-privileged user, but it makes me sad to just run everything as root. At this point though RHEL 6.5 is kinda forcing my hand, so we can remove it.
The libffi-devel requirement is a weird one. We need it because python-etcd depends on PyOpenSSL, but we don't actually need PyOpenSSL here (because we aren't using SSL at any point). Which is kinda crappy.

Solution for libffi-devel:
Enable Redhat repository Optional subchannel as follows:
•	Search /etc/yum.repos.d for the string ‘rhel-6-server-optional-rpms’
•	In the ‘rhel-6-server-optional-rpms’ section change the enable = value from 0 to 1
•	Run ‘yum list libffi-devel’ – to verify the package is now seen (investigate if not)
•	Run ‘yum install libffi-devel’

The plugin is hitting exceptions:
2015-04-24 16:14:54.001 1464 ERROR calico.openstack.mech_calico [-] Exception in periodic resync thread
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico Traceback (most recent call last):
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico   File "/usr/lib/python2.6/site-packages/calico/openstack/t_etcd.py", line 88, in periodic_resync_thread
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico     self.provide_felix_config()
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico   File "/usr/lib/python2.6/site-packages/calico/openstack/t_etcd.py", line 333, in provide_felix_config
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico     prefix = self.client.read(iface_pfx_key).value
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico   File "/usr/lib/python2.6/site-packages/python_etcd-0.3.3_calico_2-py2.6.egg/etcd/client.py", line 349, in read
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico     timeout=timeout, check_cluster_uuid=check_cluster_uuid)
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico   File "/usr/lib/python2.6/site-packages/python_etcd-0.3.3_calico_2-py2.6.egg/etcd/client.py", line 610, in api_execute
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico     return self._handle_server_response(response)
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico   File "/usr/lib/python2.6/site-packages/python_etcd-0.3.3_calico_2-py2.6.egg/etcd/client.py", line 626, in _handle_server_response
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico     etcd.EtcdError.handle(**r)
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico   File "/usr/lib/python2.6/site-packages/python_etcd-0.3.3_calico_2-py2.6.egg/etcd/init.py", line 193, in handle
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico     raise exc(msg, payload)
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico UnboundLocalError: local variable 'payload' referenced before assignment
2015-04-24 16:14:54.001 1464 TRACE calico.openstack.mech_calico

Calico felix doesn't start:
Traceback (most recent call last):
File "/usr/bin/calico-felix", line 9, in
load_entry_point('calico==0.16', 'console_scripts', 'calico-felix')()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.6/site-packages/calico/felix/felix.py", line 33, in
from calico.felix.fiptables import IptablesUpdater
File "/usr/lib/python2.6/site-packages/calico/felix/fiptables.py", line 30, in
from gevent import subprocess
ImportError: cannot import name subprocess
I checked, and I do have python-gevent installed:
yum list python-gevent
Loaded plugins: product-id, security, subscription-manager
Installed Packages
python-gevent.x86_64                                                            0.13.8-3.el6                                                            @epel

Well the subprocess thing is going to be a problem. gevent.subprocess was added in gevent 1.0, which it looks like RHEL 6.5 does not have.

The installed python-gevent can be upgraded to a suitable version by running yum install python-pip, pip install gevent --upgrade.  Felix then proceeds further before hitting the same bug as the plugin.

The immediate plugin (and Felix, given a suitable gevent) problem is a bug in python-etcd - init.py:handle references the undefined payload if the .format() fails.
This hides an underlying issue though - when a read is issued for a non-existent key, an etcd.EtcdException: Unable to decode server response exception is emitted.

The python-etcd issue is caused by it not properly supporting python 2.6.  See https://github.com/Metaswitch/python-etcd/issues/4.

EL6 comes with ipset v6.11, which doesn't support -file (EL7 uses v6.19).
FailedSystemCall: Failed system call (retcode : 2, args : ('ipset', 'restore', '-file', '/tmp/tmplxoZzh'))   stdout  :   stderr  : ipset v6.11: Unknown argument -file

The ipset issue can be resolved by installing v6.19 by running rpm -Uvh on the 2 rpms linked below:
http://rpm.pbone.net/index.php3/stat/4/idpl/23986399/dir/redhat_el_6/com/libipset3-6.19-32.1.x86_64.rpm.html
http://rpm.pbone.net/index.php3/stat/4/idpl/23986390/dir/redhat_el_6/com/ipset-6.19-32.1.x86_64.rpm.html

There's also an iptables issue (this is a regression from zmq Felix) - v1.4.7 (installed) doesn't support --wait.  The right thing to do is probably just not pass it.

Removing the --wait flag from the (single) call that uses it fixes this - ipsets are programmed and everything seems shiny.

IIRC, --wait is needed to allow multiple (green) threads to (successfully) program iptables at the same time.

There was a lot of discussion about this at the time, involving it not doing quite what it suggested anyway, I suggest finding the older issues.

So why was --wait still there then?
But I don't want to be a pain here, because this isn't something that I've paid close attention to.  Just trying to flag something in case it was important and had been forgotten...

Tagging this with 0.21 just to give it a label.  Please triage before 0.21.

At the moment, we're waiting for someone to confirm that they actually need RHEL 6.5 support - until we get that confirmation, we're not going to proactively fix our RHEL 6.5 code/instructions.  @fasaxc Have you any evidence that RHEL 6.5 is required by any of your contacts or were you just flagging this so that all our issues were labelled?

The latter, just forcing us to triage so it didn't get lost.

Closing this as we currently have no active plans to resurrect RHEL 6.5 support.

python-etcd 0.4.3 doesn't work on python 2.6.  0.4.2 works: there's also a 0.4.2+calico version we made with some better logging that works.

Since #946 removes our unit testing of Python 2.6, there's some more risk that the code itself drifts away from being 2.6 compatible.  This shouldn't be too difficult to get running again (with old python-etcd) if needed: the differences in other packages are more scary.
Note that Red Hat will support OSP 5 (the last one that supports RHEL 6) until June 2017.

authors: DaveLangridge Lukasa ed-harrison fasaxc matthewdupre neiljerram


text:
hello

Hello this is work only game with steam ? or all game and need steam open ?

This works with any games that have steamoverlay

authors: Mevasss skullcheat

repo: Mevasss/Steam-Overlay-External-Render

license: MIT


text:
Mention required scope for GITHUB_TOKEN

Closes #104

Thanks!

Thanks!


text:
Fix instruction README for install by script

issue close #823

Any reason why this is a PR to master?

Yes, this instruction is used by new installations use the old syntax, this syntax fail in for read choise of bash sentence.
There a problem in release number I mentioned before in other issues.
I'll create a new Pull Request to develop to and change for website.

authors: MichMich roramirez

repo: MichMich/MagicMirror


text:
python-tools was unable to find your machine's python executable.

I have multiple python versions installed. The executable files have been renamed python27.exe and python36.exe so as to be able to test the code with a range of python versions. The script works when the file is called python.exe.
Is this something that can be fixed.

After a little bit of head scratching I managed to figure this out, open the file called
"python-tools.coffe"
find line 21 it should be nested into "pythonPath" and it's where you're supposed to put the installation directory of python.
I know this comes a tad late but I hope this helps.

Thanks man.. It seems that it is a so common issue that it doesn't get answered anymore, I had to go almost a year back to find your solution

repo: MichaelAquilina/python-tools


text:
Save the current state of the banned list

Purpose
It would be helpful if the banned list would persist between vscode sessions. So, this will save the state of the banned users into this extension's global state.
Changed Files

ChatClient.ts Included a parameter to pass the global state object to the Themer class.
Themer.ts Added the logic needed to add/remove the banned users to/from the global state of the extension.
extension.ts Refactored the ChatClient to be instantiated from within the activate function in order to pass parameters only available when vscode activates the extension (the globalState object).

@all-contributors please add @parithon for ideas, code, documentation

:shipit:

authors: MichaelJolley parithon

repo: MichaelJolley/vscode-twitch-themer


text:
Better way of counter measures

In your current implementation, you're using an infinite loop, such as while (true) or for(;;)0, to halt script execution. While this approach works, it quickly reveals the source of the blockage when using standard debugging tools or breakpoints and for an experienced developer it will be pretty easy to prevent or cancel this.

However, I've discovered a more advanced and less detectable method by leveraging an immediately invoked asynchronous function, like this:
(async function f() { f(), f() });

(just stucks)
What's remarkable is that, when using this method, it becomes extremely difficult to trace where the execution is getting stuck, as debugging tools—at least in Chromium and Firefox—fail to provide any clear indication. Additionally, by embedding a redirect inside this function, such as: window.location.href = "https://example.com/script-is-blocked"; the behavior becomes even harder to track or bypass.
It's important to note that the function must be asynchronous for this technique to work effectively.

Great find, will add this for 2.0

NodeJS reveals a trace when trying this

@MichaelXF this is interesting behaviour. Probably have to research how different JavaScript engines react to that. But in most cases I am talking about browsers. For node you can try add more functions inside, if it will help.

@MichaelXF the analog of that for node.js will be
(async function f() { setTimeout(f); setTimeout(f); })()

I less like this approach since it is uses redefinable constructions such as setTimeout

repo: MichaelXF/js-confuser


text:
Update j2c info

Hello Michele,
here's an update to the j2c information and example. j2c doesn't support autoprefixer at the moment, even though a plugin is in the works.
Thanks again for making this list.

awesome, thanks @pygy

authors: MicheleBertoli pygy

repo: MicheleBertoli/css-in-js


text:
Fix for [#46], test updates

Snuck in an update to test against the latest Django version (1.11.4), otherwise the title says it all.

@jjjordanmsft,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Wrong branch.

authors: jjjordanmsft msftclas

repo: Microsoft/ApplicationInsights-Python


text:
How can i log  data from the request in the request telemetry

I  have a need to log some of the details of the request in Application Insights which will help me better track the web service requests.
I thought of logging it as CustomData in the request. I found the way to do so is by setting Context properties in the telemetry client.
I did so with the code below.
telemetry.Context.Properties["CustomGuid"] = data;
telemetry.TrackRequest(request);
But this logged a duplicate request with all the data i needed. But i dont want  duplicate requests to be logged. I would like to get the custom data to be logged as part of the request telemetry originally logged.
Is there any way i can do this ?

You can obtain the RequestTelemetry object corresponding to the current request from the OperationContext like this:
using Microsoft.ApplicationInsights.Wcf;
...
var request = OperationContext.Current.GetRequestTelemetry();
request.Properties["CustomGuid"] = data;

You don't need to call TrackRequest() in this case.

@tomasr thanks for your answer. Any idea how to do this in ASP.NET?

authors: OliverRC ranjitkrishnan tomasr

repo: Microsoft/ApplicationInsights-SDK-Labs


text:
Minimize error chances and update to 2.1.0 SDK

This PR tries to minimize access to WCF operation context in some cases to reduce the chance we'll end up trying to access a closed request message. Also updates to referencing the 2.1.0 SDK to match the core and Web SDKs.

:shipit:

authors: SergeyKanzhelev tomasr


text:
Unable to reboot windows with Bash On Windows

When using the reboot command in Bash On Windows I get the error Failed to connect to bus: No such file or directory

Since I could be running multiple Linux terminals (say one copy of Fedora and one copy of Ubuntu) simultaneously, would it be desirable that reboot in Ubuntu would also stop my Fedora session and reboot my entire computer?
This one doesn't make much sense to me, at least as WSL is now...
Once WSL supports an Init daemon and automatically bringing up a bunch of services, this would make a lot more sense... At least to use reboot to restart all processes related to that WSL instance.
Continuing to rely on shutdown.exe would probably make more sense for rebooting the entire system.

@ryanerwin - Agreed.  If we eventually do support running system I would expect the reboot command to terminate just the current WSL distribution, not reboot the entire Windows machine.

Per Ben, rebooting Windows from withing WSL with the reboot(8) command per the issue title was declined by-design. For shutting down the instance (contrast rebooting Windows) see #3253. Workaround (put in your .bashrc or similar):
alias reboot='powershell.exe -command reboot-computer'

Or if you are a good person and haven't given yourself Windows Administrator privileges:
alias reboot='runas.exe /noprofile /user:Administrator "powershell.exe -command reboot-computer"'

authors: benhillis panda2k ryanerwin therealkenc

repo: Microsoft/BashOnWindows


text:
Is someone answering questions on StackOverflow?

[question]
I asked questions on Stackoverflow as advised, but nobody is answering. Isn't that the right channel for questions anymore?
Thank you!

It is the correct form for questions.  @JasonSowers can you follow up please?

Yes, stack overflow is the correct forum to ask how to questions.  Please include as much detail in your questions as possible.  Information like which SDK you are using is important.  Response time will vary based on how many support request there are at the time, but generally will be responded to within 24-72 business hours.

authors: JasonSowers beradrian sgellock

repo: Microsoft/BotBuilder-Samples


text:
Slack Channel for Bot Framework Help / Issues?

Is there a community Slack channel for support / discussions on the bot framework ?
The ASP.NET / Dotnet slack team doesn't have a botframework channel.. but microsoft-community.slack.com does..
It would be nice to be able to chat among bot developers.

@AmitBhatnagar24 I don't know of any community. When you post a slack specific question here, other slack users may chime in. Let us know if you hear about any community!

Closing the issue, but feel free to reopen if you have follow ups!

Also, StackOverflow may be a good place to ask questions and exchange ideas with other fellow bot developers. The Bot Framework team also monitors StackOverflow to provide support.

repo: Microsoft/BotBuilder


text:
First Message to Bot Gives Error

System Information

SDK Language:  .NET
SDK Version: 3.9.0
Development Environment: App Service

Bot Info

Bot name: OFBOT
Bot handle: OFBOT
App ID: 3ec62770-09bb-4ad3-b175-3e92e961f624
Connected channels: WebChat

Issue Description
Whenever i send my first message to bot i see "couldnt send (retry)" in web chat. And it works fine if i resend. This started happening since today. My App ID is 3ec62770-09bb-4ad3-b175-3e92e961f624.
I am calling LUIS dialog to find the intent.
Steps to Reproduce the Issue

Write "Hi" to the bot you see error
Retry and it works fine

I notice this issue as well, but it only happens with WebChat. Try testing it out with the Emulator and see if you see the same error. I think this is just a bug? My bot functions fine in every other channel, but WebChat seems to always give me that first Error.
Here is the error:

On emulator it worked fine. Haven't tried it on Skype or any other channel.

@neetgupta7 @megancooper how long has this been happening for?
Looking at OFBOT I see the behavior you are describing.  I also see errors in the webchat channel like below:

@JasonSowers I have been since past 8-9 hours

@JasonSowers I noticed it when I first began testing my bot, maybe mid-june

@neetgupta7 I tried to take a look at this again today and was unable to test your bot.

I experience this when I am using a low hosting tier (free) and allow Azure to put my app to sleep when not used for a while (setting "App Settings" / "Always On" = Off). This will typically timeout the first request while the App Service wakes up again.

please continue the conversation if needed.  We can reopen this if you have not resolved it.

authors: JasonSowers megancooper neetgupta7 tiloc


text:
[Facebook] why am I getting message "already in use by another bot"

Bot Info

App ID: 3ce561e7-dff8-47d9-b926-edca552e6e4a
SDK Platform: .NET
SDK Version:
Active Channels: Facebook
Deployment Environment: Auzure Bot Service

Issue Description
hi Team
I create a Bot Service on Azure
When I set up a Facebook Channel, I got this error message

I'm sure this Facebook Page 125143697558679 is not connected to any Bot
Can help solve this problem?

Thanks for reporting, let us look into this for you.

I have confirmed Facebook Page 125143697558679 is already registered to another bot.  This is the reason you are seeing this error.  The bot it is registered to has a very similar name to yours.  I will reach out via the email address registered to that bot.

Thank you for your assistance
The Facebook page has 150,000 people tracked and contacted more than 1 million people
Connect bot framework is very important to my company

@madukapai Did you resolve this?  I never heard back from the email I sent.

@JasonSowers Not resolved, so can I try to connect this page id now?

For security reasons, I cannot give out the email listed on the bot. The bot registered to that facebook page is named Kuai3FacebookRobot.  I'm happy to help and provide any information I can and help resolve this.  I will send another email to the Hotmail email address listed with the Kuai3FacebookRobot bot.

@JasonSowers Thank you very much,
I guess, registered BOT email address may be maduka_bor@hotmail.com or maduka_phone@hotmail.com, the both are currently in use by me, so if I provide email address is correct, I can provide more Information (ex:bot framework screen, azure web app screen...) to confirm and resolve this problem.

I also have this same message. I did have another bot for testing, but I removed that. So not sure what to do now. Our page ID is  103749919719606.  The web chat test is working fine in our case. Really like this product so hope we can solve this. Thanks.

Same issue here, mi page ID is: 559757797690577. Email: diegosv19@gmail.com. I deleted the previous bot and I'm trying to link the same page with a new bot with different azure account.

Same issue here. any solution available?

Same issue here

I succeeded to somehow overriding this bug with the following hack:
 public virtual async Task<HttpResponseMessage> Post([FromBody] Microsoft.Bot.Connector.Activity activity)
        {

            //this is a stupid hack, solving the problem here: https://github.com/Microsoft/BotBuilder/issues/3893
            if (activity.Recipient.Name == "<old app name>")
            {
                activity.Recipient.Name = "<new app name>";
                activity.Recipient.Id = "<Fake page id>";
            }

where "old app name" is the name that the bot thinks is still connected to the FB page,
new app name is the current connected application, and "Fake page id" is the id you insert in the new bot service when creating the "messenger" channel connection.  i inserted my real page id with space in the end, and then i can save it.

Closing the issue assuming it as resolved. Please reopen a new issue if it still persists.

authors: JasonSowers dsanabriav fanidamj madukapai mvanhalen yochail


text:
Equivalent of session.sendMessage on v3

Using Node.js version 3.1.1
On v1, we had Session.sendMessage, where we could have a JSON be sent exactly as is to the desired channel. That was useful for quick testing and implementing stuff that's not yet implemented on the lib.
I don't seem to be able to use it on v3. I get "[TypeError: session.sendMessage is not a function]"
Is there an alternative to sending raw output to the channels? Using session.send doesn't seem to work.

This was changed to sourceEvent() in v3, and separated from the send action itself. With sourceEvent(), you can specify per-channel channelData. Example sending a custom message for Telegram:
var reply = new builder.Message(session);
reply.sourceEvent({
	telegram: {
		method: "sendMessage",
		parameters: {
			text: "<b>sample</b>",
			parse_mode: "HTML"
		}
	}
})
session.send(reply);

Oh I hadn't come across this method on the documentation. Thank you!
For any Googlers that arrive on this with the same problem. Here is an example for sending an "account linking" card on Facebook:
session.send(new builder.Message(session)                     .sourceEvent({                         facebook: {                             notification_type: "REGULAR",                             attachment: {                                 "type": "template",                                 "payload": {                                     "template_type": "generic",                                     "elements": [{                                         "title": "Welcome to M-Bank",                                         "image_url": "http://www.example.com/images/m-bank.png",                                         "buttons": [{                                             "type": "account_unlink"                                         }]                                     }]                                 }                             }                         }                     }));

@matheus208 Hello , matheus could you guide me on what should happen on the back-end side for authorization please? I have a feeling it's a very complex process
Feels like this should work but don't understand the redirect process
https://gist.github.com/miki2826/76653b715c85d39181f0a57143f7a35c
in res.redirect(req.query.redirect_uri + '&authorization_code=' + req.user.id); what is the redirect_uri feels like this should be the address where my bot lives and I'm passing it an authorzation code to confirm the login ? But for this to work I have a feeling this express backend and the bot must live in the same code base which is not the case currently. For the bot I'm using claudia bot builder and it lives in a lambda function and this express backend lives on my local machine.

authors: cAstraea eanders-MS matheus208


text:
ManualCredentials is not valid field for Web.Contents on the Visual Studio SDK

I'm implementing a Connector to a GraphQL API service and on the Visual Studio SDK, the Web.Contents returns an error on the following:
...
DefaultRequestHeaders = [
#"Authorization" = "Bearer " & Extension.CurrentCredential()[Key],
#"Content-Type" = "application/json"
],
    _query = query,
    Source = Json.Document(Web.Contents(Url,[
     Headers = DefaultRequestHeaders,
     Content = Text.ToBinary(_query),
     ManualCredentials = true
         ]
    ))

...
But it works fine when compiling the Connector to Power BI. Just letting you know because it makes really anoying when testing.

It the parameter is removed, it keeps it's expected behavior on the Power BI but still doesn't work on the Visual Studio Power Query SDK

I know of no reason this would work differently in the SDK than in Power BI Desktop, provided that in both cases we're running in the context of a custom data connector. What kind of error do you get?

Here is my workaround to the problem that what I use to authenticate on Power BI does not quite work on the Visual Studio SDK. I have to comment the "On PowerBI" section and uncomment the "On Visual Studio" section.
 Service.MakeQuery = (query as text) as record =>
    let

        //On PowerBI

        DefaultRequestHeaders = [
                    #"Authorization" = "Bearer " & Extension.CurrentCredential()[Key],
                    #"Content-Type" = "application/json"
            ],
        Source = Json.Document(Web.Contents(Url,[
         Headers = DefaultRequestHeaders,
         Content = Text.ToBinary(query)
             ]
        ))

 //On VisualStudio

//          DefaultRequestHeaders = [
//                     #"Authorization" = "Bearer " & Json.Document(Extension.Contents("ApiKey.json"))[Key],
//                     #"Content-Type" = "application/json"
//             ],
//         Source = Json.Document(Web.Contents(Url,[
//          Headers = DefaultRequestHeaders,
//          Content = Text.ToBinary(query)
//              ]
//         ))
//
//
    in
           Source;

// Variables of the project
 Url = "https://app.pipefy.com/queries";

// Data Source Kind description

Service = [
    Authentication = [
        Key = [
        Label = "API Key"
        ]
    ],
     Label = " API Key"
];

If I try to run it as it is (set to the "On Power BI mode") I get the error

If I try to run on the Anonymous Mode, I get "We're sorry, an error occurred during evaluation."

I take it you clicked the "Set Credential" button after entering the key?

I can't reproduce this issue. As Curt mentions above, please make sure you click the Set Credential button to actually store the credential, and then re-run the test code.

authors: CurtHagenlocher GFWagnitz mattmasson

repo: Microsoft/DataConnectors


text:
how to find the best split point in each bin?

I wonder that how to find the best split point in the bins of  LightGBM ?

which is the function to compute the split ? Is it same to the Xgboost ?
In each leaf, the dataset is redivided  to bins again? or it is divided  well  by the number of bins when inited ?thank you

LightGBM uses the static bin mapping, therefore, the bins aren't re-constructed during training.
As for best split point, it is almost the same as XGBoost, as well as the standard decision tree growing.

authors: guolinke moseshu

repo: Microsoft/LightGBM


text:
Trigger AppVeyor

This change is

Codecov Report

Merging #10 into Dev will not change coverage.
The diff coverage is 0%.

@@          Coverage Diff          @@
##             Dev     #10   +/-   ##
=====================================
  Coverage   2.85%   2.85%
=====================================
  Files          2       2
  Lines         70      70
=====================================
  Hits           2       2
  Misses        68      68

Impacted Files
Coverage Δ

...365DSC/DSCResources/MSFT_SPOSite/MSFT_SPOSite.psm1
2.94% <0%> (ø)
:arrow_up:

...5DSC/DSCResources/MSFT_O365User/MSFT_O365User.psm1
2.77% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a75419c...816b6ff. Read the comment docs.

authors: NikCharlebois codecov-io


text:
Error trying update 2+ python libs in VS15 Preview 4, Python Environments.

Upgrade method asked for rights elevation first time but becomes silent for next library. First library is  updated successfully and second one failed.
[Window Title]
Python Tools for Visual Studio
[Main Instruction]
An unexpected error occurred
[Content]
Please press Ctrl+C to copy the contents of this dialog and report this error to our issue tracker.
[^] Hide details  [Закрыть]
[Expanded Information]
System.Net.Sockets.SocketException (0x80004005): Сделана попытка доступа к сокету методом, запрещенным правами доступа
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.Net.Sockets.TcpListener.Start(Int32 backlog)
   at Microsoft.PythonTools.Infrastructure.ProcessOutput.RunElevated(String filename, IEnumerable`1 arguments, String workingDirectory, IEnumerable`1 env, Redirector redirector, Boolean quoteArgs, Boolean elevate, Encoding outputEncoding, Encoding errorEncoding)
   at Microsoft.PythonTools.Infrastructure.ProcessOutput.Run(String filename, IEnumerable`1 arguments, String workingDirectory, IEnumerable`1 env, Boolean visible, Redirector redirector, Boolean quoteArgs, Boolean elevate, Encoding outputEncoding, Encoding errorEncoding)
   at Microsoft.PythonTools.EnvironmentsList.PipExtensionProvider.<InstallPackage>d__52.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PythonTools.EnvironmentsList.PipExtension.<UpgradePackage_Executed>d__10.MoveNext()

For my own reference, the error message translates as "An attempt is made to access the socket method prohibited privileges".
I'll have to look into how this can happen. Possibly we are trying to run two things at once with the same port?

authors: tcyan zooba

repo: Microsoft/PTVS


text:
Updates data-set of ChicletSlicer

Fixes bug #371

This change is

Hi @ignatvilesov, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Vilesov Ignat (Akvelon)). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

Thanks, lgtm.

authors: dmitriy-tarasov ignatvilesov msftclas

repo: Microsoft/PowerBI-visuals


text:
What's the difference between procdump and gcore?

Apart from conditional core dump, e.g monitoring the CPU usage of target process
What's the difference between this and the traditional gcore tool?

gcore is an on demand dump generation tool which works well in the low hanging fruit scenarios where issues are fully reproducible. In production however, that is rarely the case and you need a tool that can actively monitor and trigger dumps. We have a future work item to remove the dependency on gcore to allow more flexibility in the types of dumps we create.

Thanks!

authors: CaledoniaProject MarioHewardt

repo: Microsoft/ProcDump-for-Linux


text:
Override behavior of view() command to open Data Table viewer

This is a nice to have post PP.

https://github.com/Microsoft/RTVS/commit/c15056c2fa91884f38d5b672002d84598d3be5e1

authors: MikhailArkhipov jflam

repo: Microsoft/RTVS


text:
Playground: Can't scroll left with Mac trackpad on Chrome

When the playground editors have horizontal scroll, you can't scroll left in Chrome on Mac as it triggers the back gesture.
Expected behavior:
When I 2-finger swipe to left, the editor should scroll.
Actual behavior:
Back gesture is triggered

The Playground editor is built on Monaco Editor.  Maybe better to raise your issue there.

Hmmm it works properly there

Cool, logged it there https://github.com/Microsoft/monaco-editor/issues/211

thanks @kitsonk!

authors: kitsonk mhegazy stowball

repo: Microsoft/TypeScript


text:
String enum too verbose to use

TypeScript Version:  2.1.1 / nightly (2.2.0-dev.201xxxxx)
Code
type Axes = "x" | "y" | "z";
const Axes = {
  X: "x", // Not X: "x" as Axes
  Y: "y",
  Z: "z"
}

function test(axes: Axes) {}

test(Axes.X); // Argument of type 'string' is not assignable to parameter of type 'Axes'.

Expected behavior:
No error
Actual behavior:
Assignability error
Since Axes is declared as a const, I expect the type inference to resolve Axes.X to "x" without the need for "as Axes".

Axes is const, so someone can't do Axes = .., but the properties of the object referred to be Axes are still mutable, so someone could do Axes.X = "foo", which is allowed since TypeScript inferred the X property to be of type string, not "x".
There's probably a few ways to do what you want. Here's one:
type Axes = "x" | "y" | "z";
namespace Axes {
  export const
    X = "x",
    Y = "y",
    Z = "z"
}

function test(axes: Axes) {}

test(Axes.X);

You could also use an enum, but the values have to be numbers then.

Thanks. Hmm. I think I used "x" as Axes when I tried to reassign a random string to Axes.X, so it is indeed working as intended.
Using namespace is not always ideal as it compiles to an IIFE and bloats code size. I came up with the following:
type Axes = {
  readonly X: "x"
}
const Axes: Axes = {
  X: "x"
}

function test(axes: Axes[keyof Axes]) {}

test(Axes.X);

Still verbose but you get the real const check.

String enums is tracked by https://github.com/Microsoft/TypeScript/issues/1206

authors: Dominator008 jesseschalken mhegazy


text:
How can use Type Checker get  Interface or Class extends type

example code:
class Animal {
    name: string;
}
class Dog extends Animal {
    breed: string;
}

interface DataProps {
    color?: string;
}

interface DogProps extends DataProps {
    type?: "Beagle" | "Sheepdog"；
}

in Class extends I can use check extends names:
const symbol = this.checker.getSymbolAtLocation((<ts.ClassDeclaration> node).name);
const extendsDocEntry = "declarations" in symbol? symbol.declarations.map((declaration: any) => (
	"expression" in declaration && declaration.expression.text
)).filter((extendsName: any) => extendsName) : void 0;

but i do not know if this is the correct code.
and i still don't know how get  Interface extends.
Please help me solve this problem, very grateful.

I'm not part of this project but I think you're meant to ask questions here

@hherman1 Thanks for your help, i will try, but i can not find any useful documentation and useful data in symbol

(n.b. names may not be exact, this is from memory) You can walk the declarations array to look for something that has a kind === SyntaxKind.InterfaceDeclaration; that node has an optional heritageClauses array which will have an element for the extends DataProps clause.

@myxvisual I answered your question here.

Please don't cross-post to SO without linking the question here - it creates duplication of effort.

@RyanCavanaugh @dsherret Very grateful, thanks

authors: RyanCavanaugh dsherret hherman1 myxvisual


text:
Cannot define a module for a specific file extension in 2.4.1

TypeScript Version:  2.4.1
Code
// A *self-contained* demonstration of the problem follows...
declare module "*.vue" {
  import Vue from 'vue'
  export default typeof Vue
}

Expected behavior:
A file with the above content used to work when importing .vue files.
In 2.4.1 It looks like the file is not taken into account as every .vue file gets imported as "string"?
Actual behavior:
Everything seems to be imported as string?

That file is perfectly working in 2.3.4

The right hand side of an export default is an expression not a type. typeof Vue is just calling the regular JS typeof operator on the reference Vue; and that happens to be a string all the time..
This should have been an error to have an expression in an ambient context. the only possible value should be an identifier name. files https://github.com/Microsoft/TypeScript/issues/17991 to track it.
so for this definition, you need to change your declaration to be:
declare module "*.vue" {
    import Vue from 'vue'
    const _: typeof Vue;
    export default _;
}

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

authors: mhegazy vekexasia


text:
awaiting a Promise recasts top variable to initial type

TypeScript Version:  2.6.1, 2.7.0-dev.20171110
function test(a: boolean): false | Date {
    if (a) {
        return new Date();
    }

    return false;
}

async function test2() {
    let b = test(true);

    if (!b) {
        b = new Date();
    }

    await Promise.all([]).then(() => {
        b.getDate(); //Should compile.

    })
}

Expected behavior:
Should compile
Actual behavior:
Throws with Property 'getDate' does not exist on type 'true'.

This can be reproduced with any return type and even when type inference is used.

Likely duplicate of #13180. Also, see https://github.com/Microsoft/TypeScript/issues/9998 for detailed commentary and discussion.
Simple fix:
async function test2() {
  const b = test(true) || new Date();
  await Promise.all([]).then(() => {
      b.getDate(); // compiles.
  });
}

Thanls @aluanhaddad The simple fix works and looks like #9998 should cover this. Closing this ticket.

authors: aluanhaddad bondz


text:
Allow type parameter constraints to reference other type parameters

I would like to have some feature that infers any possible types from the given object in the generic function.
For instance I have a function that receives Object, and I want to have a more specific callback than 'any'.
Current code:
function a(obj: Object, f: (value: any) => any) {
 for(var p in obj) if(obj.hasOwnProperty(p)) {
  (<any>obj)[p] = f((<any>obj)[p])
 }
}

a({x:1}, (value: any) => (<number>value)+1);

I wish I had something with more strict typing.
function a<T extends Object, Value: union_of_properties_types_of(T)>(obj: T, f: (value: Value) => Value) {
 for(var p in obj) if(obj.hasOwnProperty(p)) {
  (<any>obj)[p] = f(<Value>(<any>obj)[p])
 }
}

// 'f' is denoted to number => number
a({x:1}, value => value+1);

// 'f' is string => string
a({x:"x", y:"y"}, value => {
 return value+"z";
});

If we allowed type parameter constraints to reference other type parameters this signature might get you what you wanted:
function a<PropType, T extends { [idx:string]: PropType }>(obj: T, f: (value: PropType) => PropType) { .. }

If PropType will be a union type, then yes.

I wanted to give another example for where this would come in useful in the React bindings.
React has an API that looks like createElement(componentType, props). The type of props is specific to the componentType being used. Today this is modeled with:
createElement
(type: { new(): Component
 }, props: P): ReactElement

However, in actuality there is an implicit prop called ref that can be used on any component. This prop is a function whose single argument is an instance of the component. This could be modeled with:
createElement(type: { new(): C }, props: P & { ref: (component: C) => any }): ReactElement

However, the above isn't currently allowed due to this issue. Ideally not only would the above be allowed but also have the type arguments inferred from usage.

@ahejlsberg is going to see what would be involved in removing the restriction. It may be as simple as removing the error, or there may be deeper problems with circularity that motivated this back in the Ye Olde Compiler days.

I would really like this as well for strongly typing a function that can merge properties, e.g. _.extends. The intersection syntax can correctly tell the compiler the return type of the function, but it can't infer types for the properties of the arguments that also exist on T. Having T extend U would be sufficient I think.

authors: DeadMG NN--- RyanCavanaugh danquirk jbrantly


text:
Type error in Buffer.from()

Greetings folks! 👋
I'm getting a type error I can't explain.  I have some code like this:
function doStuff(foo: string|Buffer) {
  return Buffer.from(foo);
}

This gives me the compilation error:

Argument of type 'string | Buffer' is not assignable to parameter of type 'string'.  Type 'Buffer' is not assignable to type 'string'.

This is weird, because Buffer.from can accept a string or a Buffer.  The d.ts for node.js appears to check out:
    /**
     * Copies the passed {buffer} data onto a new Buffer instance.
     */
    from(buffer: Buffer): Buffer;
    /**
     * Creates a new Buffer containing the given JavaScript string {str}.
     * If provided, the {encoding} parameter identifies the character encoding.
     * If not provided, {encoding} defaults to 'utf8'.
     */
    from(str: string, encoding?: string): Buffer;

This kinda feels like a bug.  Am I missing something?  Thanks!
cc @ofrobots

@mhegazy I think this issue is not related to lib.d.ts. Buffer does not exist in Browser API, only in NodeJS. So I suppose fix should be added in DefinitelyTyped/DefinitelyTyped/types/node. What do you think?

@mhegazy I think this issue is not related to lib.d.ts. Buffer does not exist in Browser API, only in NodeJS. So I suppose fix should be added in DefinitelyTyped/DefinitelyTyped/types/node. What do you think?

Doh! thanks @a-tarasyuk for the correction. yes this should be done on the DT side. and looks like that you fixed it already in https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24966. thanks!

Sorry to be late to the game; I'm not a fan of the fix:

There's a definition for Buffer.from(string) in the Node v4 definition, but the API didn't exist until Node 5.
We're missing the second parameter for Buffer.from(string)
There is a commented out type name in the parameter list for Buffer.from
The methods docs are worse than their predecessor.

Do we really need to muddy the codebase when the workaround is so simple? It seems like the right thing to do is ask someone to "me too" the original issue and add the 3LOC workaround:
function doStuff(foo: string|Buffer) {
  // https://github.com/Microsoft/TypeScript/issues/14107
  if (typeof foo === 'string') {
    // Now my code can even handle strings that were in hex64,
    // not ascii.
    foo = Buffer.from(foo/*, optEncoding */);
  }
  // do real stuff
}

It isn't like this is a big deal for us or anything, just found it to be a minor inconvenience and something I should probably report :)  I'm perfectly happy to wait for https://github.com/Microsoft/TypeScript/issues/14107 to land.

Sorry, I didn't mean to bite off anyone's head either. I'm really glad you reported the issue and I hope that the bug leaves a paper trail so more people can add pressure to #14107; the TypeScript team has got loads on their plate and +1s help them balance priorities.
@a-tarasyuk; would it be possible to revert since the fix added bugs? @JustinBeckwith should be able to work around with the if (typeof foo === 'string') clause and it will actually lead to more explicit and self documenting code if he includes the encoding he wants.

@inlined sure, I can make PR. The fix is ready just need to get approve from @mhegazy, and make PR on GitHub. Does it work for you?

Yeah. If @mhegazy is onboard
On Mon, Apr 16, 2018 at 12:40 AM Alexander T. notifications@github.com
wrote:

@inlined https://github.com/inlined sure, I can make PR. The fix is
ready just need to get approve from @mhegazy https://github.com/mhegazy,
and make PR on GitHub. Does it work for you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/TypeScript/issues/23155#issuecomment-381507823,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABe1j0ysf3PlWm1EhgBpipGxXKwLh8vEks5tpEsAgaJpZM4THpfV
.

I do not think the change is bad really. The order of the overloads can be fixed to address the issues you are referring to earlier. But in general it is better to use union types than having multiple overloads.

There is a commented out type name in the parameter list for Buffer.from

@inlined I expect you refer to TypedArray. The problem here is that this is a ES6 type and if we change node typings to require lib ES6 we break a lot use code (I did this once....). But Node supports TypedArray here so you can see this a placehoder for the future.
By the way, which exact use is the problem now? I locally added Buffer.from("ffo", "utf-8") in the tests and no complain from typescript. Which way do you call Buffer.from() and which typescript version?

Looks like I've overreacted to everything. I retract my previous comments. Thanks everyone for being patient with me here.

The problem here is that this is a ES6 type and if we change node typings to require lib ES6 we break a lot use code (I did this once....).

Is it not reasonable to expose the type in types/node/v8 and remove the comment elsewhere?

By the way, which exact use is the problem now? I locally added Buffer.from("ffo", "utf-8") in the tests and no complain from typescript.

Yup... A total facepalm moment on my part. I missed the one overload after the GitHub  diff collapse.

It's also available in NodeJS 4

Interesting; the v4 docs and 4.5 release notes agree. The latest docs misleadingly say "added in 5.10". Should we not be trusting those docs when reviewing this codebase?

Is it not reasonable to expose the type in types/node/v8 and remove the comment elsewhere?

I found that my last statement in this is outdated - nodejs typings refer to lib.es6.d.ts already so Int8Array,... are available.
Therefore I think it would be possible to add | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array or define a type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array.
There are a few other locations where TypedArray is commented so they should be adapted also if someone creates a PR for this.

Interesting; the v4 docs and 4.5 release notes agree. The latest docs misleadingly say "added in 5.10". Should we not be trusting those docs when reviewing this codebase?

Well, I did a fast try and then it was clear the v4 doc is correct. I expect this is a side effect of how NodeJs backports new APIs. First they land on master and get released (e.g. in 5.10). The docs on master tell exactly this. A few weeks later the backport is done (for selected features only) by merging the relevant changes to v4 branch - but docs on master are not updated automatically.
I think it's up to us to create a PR towards node doc to fix this :grin:

authors: Flarna JustinBeckwith a-tarasyuk inlined mhegazy


text:
Auto imports showing imports from ../../node_modules/@types

Manually moving https://github.com/Microsoft/vscode/issues/47005 to TS Repo to continue investigation
@techsin reports that they are seeing auto import suggestions for paths such as ../../../node_modules/@types. They are using TypeScript 2.7.2 and have a jsconfig.json with proper excludes configured.
Here's the TS Server log: tsserver.log

This is how node.js module lookup works, and there are workflows that rely on the current lookup behaviour. For example monorepos using tools like lerna will have their node modules at the monorepo root, which may be several directories up from the package.json of packages declaring the dependencies.

@yortus one should be able to disable lookup beyond root directory using jsconfig.json at least. Otherwise, autosuggest feature becomes a obstacle. It causes random auto imports, which you might not be aware of if you were working at line 80.

@techsin I just noticed that this had been labeled as a bug and wanted to point out that the current behaviour is not a bug. An option sounds appropriate.

there is an option in jsconfig / tsconfig that tells what to exclude, but despite telling it to exclude node_modules, it doesn't. Not one in project root, or above in user directory.
{
	"compilerOptions": {
		"target": "es6"
	},
	"exclude": [
		"node_modules", <--- no effect
		"../../node_modules", <--- no effect
		"**/node_modules/*" <--- no effect
	]
}

Ok, got it now. The issue title makes it look like the lookup behaviour is the problem, but it's actually the exclude behaviour. I should have read the original issue, sorry!

No, Problem. I just want it fixed, more than 10 times, I've pressed tab thinking it'd something I want and end up importing random stuff which doesn't go away with 1 ctrl+z. So you have to delete whatever it expanded to and delete the line at top that says import InksljdEjlkdjksl from "../../../AppData/Microsoft/Typescript/node_modules/Something/@types/something/something"
kind makes you never use autocomplete again.

@techsin I'm having trouble reproducing this with typescript@next. I get import completions for foo and not for ../node_modules/foo. Try doing npm install -g typescript@next and pointing vscode to it (instructions). If it's still happening, could you try to get a sample project that reproduces the error that you could share?

https://github.com/techsin/vscodeAutoCompleteBug

When I try that with typescript@next:

First, I need to add export {} to turn the file into an ES6 module, otherwise we won't add import completions due to #22951
Second, I'm getting the import from "babel-types/index" and not from ../node_modules/@types/babel-types/index. (The /index is because we default to using "classic" module resolution, you can add "moduleResolution": "node" to get it to just babel-types.

I'm not sure I understand what you're saying. But auto complete suggestion aren't broken just for import statements, they're broken for almost every combination of letters 3 to 5 you write.

What I'm saying is that I tried reproducing the error, but I don't get the behavior you're seeing. I see an auto import from "babel-types/index", not ../node_modules/@types/babel-types/index. Could you double-check that you're testing with typescript@next? Vscode should show you in the bottom-right, what language server version you're using.

In VS Code, auto import suggestions broke in a similar way for me. I use Yarn's workspaces feature in a monorepo, i.e. a single repo with many packages in a packages folder. All these packages have their own package.json but yarn places the combined imports together in a node_modules folder in the repo root. All of my packages are namespaced like @stardazed/. Yarn workspaces will put links to all the subpackages in the root node_modules folder.
With VSCode 1.24.1 (latest as of now) which has TypeScript 2.9.1 bundled I get proper auto import suggestions: i.e. auto-import X from "@stardazed/package", but I have TS 2.9.2 installed globally and I set the TSDK preference to use that then suddenly auto-imports starts suggesting both:auto-import X from "../../node_modules/@stardazed/package and auto-import X from "../../node_modules/@stardazed/package/src
I changed back to 2.9.1 but this is a reproducible regression in 2.9.2, simply by enabling or disabling the TSDK preference and reloading the VSC window I can break/repair auto-imports. Not sure if this is a separate issue from this one, please advise @mhegazy

@zenmumbler can you share more info? like a sample project

I'm seeing this as well.

@mike-north just to confirm, you do not see issues when you update to typescript@next. Is this accurate?

Correct, although I wish I didn't have to update to @next because there are other issues causing trouble now. A 2.9.x patch release would be nice

typescript@3.0 should be available with the fix tomorrow.

This started happening for me too - when I need to import something from the node_modules folder it includes the relative path to it import { MatSnackBar } from '../../../../../node_modules/@angular/material'; for instance...when it should be just '@angular/material'
I can't update to typescript@3.0 ot typescript@next because of this error:
ERROR in The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but 3.0.0-dev.20180712 was found instead.
And ot top of that it used to wirk properly and I haven't changed anything in my projects and typescript versions...I think it started happening after Code update...

I am having exactly the same issues as @sapabg (seems like after VS Code update)

@MadKonst Could you create an issue containing a full sample project (probably just a tsconfig.json and a single file with a missing import)? And also test with typescript@next?

A possible solution for those dealing with relative node_modules imports.

Installing latest Typescript (at least 3.x!) locally and using it worked. Hopefully, VSCode itself updates it too.

@sapabg try if there's any other bugs. My colleague tried 2.8.x but found it has problems in importing other modules.

Thanks @Jrubzjeknf Solution on the link worked for me (Angular 6 project).

2.9.2 makes this problem. so, i downgrade version to 2.8.1,
therefore it works now ( it fixes problem, like ../../nodemodules )

I am having exactly the same issue and resolved by setting typescript verison to use workspace version instead of VS Code version. Thanks

what if you are not using typescript, and thus can't update typescript!

@techsin The latest version of vscode should already have this fixed. If it's still happening, try doing npm install -g typescript@next and setting up vscode to use the version from npm rather than its own; if there's still a problem please file a new issue.

authors: Jrubzjeknf MadKonst RayKimEX andy-ms chenyong lordgreg mhegazy mike-north mjbvz sapabg sistla001 techsin yortus zenmumbler


text:
Classes and constructor functions are not exported as types in js files

TypeScript Version:  2.9.0-dev.201xxxxx

Search Terms:
Code
// b.js

function F() {
    this.prop = 0;
}

class C {
    prop = 0;
}

exports.F = F;
exports.C = C;

// a.js

/** @type {import("./b").C} */
var x;
x.  // expect 'prop' to show in the list

/** @type {import("./b").F} */
var y;
y.  // expect 'prop' to show in the list

Expected behavior:
both x and y should have prop in their completion list
Actual behavior:
No completions
Related Issues:
I would also expect this to be have the same way:
// b.js

function F() {
    this.prop = 0;
}

class C {
    prop = 0;
}

module.exports = {
    F,
    C
}

TS 3.1.0-dev.20180901 here.
The following works.
// step.js
module.exports.Step = Step;

// task.js
/**
 * @typedef {import ("./step").Step} Step
 */

But writing here as the following may be covered here alike, but is currently. Or should i open another issue?
// step.js
module.exports = Step;

// task.js
/**
 * @typedef {import ("./step").default} Step
 */


text:
No error accessing non-existent method on string with strictNullChecks on

TypeScript Version:  3.0.1

Search Terms: strictNullChecks, inferred any, no error, parameter, argument, implicit any, property does not exist
Code
function getString(required: {}): string {
  return '';
}

function functionThatReturnsAString() {
  const optional: {} | null = null;
  return getString(optional);
}

const s = functionThatReturnsAString(); // s is correctly inferred as 'string'
s.foo(); // no error?

Expected behavior:
Expected to get error Property 'foo' does not exist on type 'string' on the last line.
Actual behavior:
No error on the last line.
With all the strict settings on, there's a different error on the argument to the getString call, but that should not affect the return type of functionThatReturnsAString. The function could be in a completely separate part of the codebase. Inspecting that should not be required when trying to debug the s.foo() call.
Playground Link:  https://www.typescriptlang.org/play/#src=function getString(required%3A {}) {
  return ''%3B%0D%0A%7D%0D%0A%0D%0Afunction%20functionThatReturnsAString()%20%7B%0D%0A%20%20const%20optional%3A%20%7B%7D%20%7C%20null%20%3D%20null%3B%0D%0A%20%20return%20getString(optional)%3B%0D%0A%7D%0D%0A%0D%0Aconst%20s%20%3D%20functionThatReturnsAString()%3B%0D%0As.foo()%3B%0D%0A
Tested with all strict options on. (Note that Playground has been finnicky today.)
Related Issues:

I believe this is because of this line in checker.ts:
return produceDiagnostics || !args ? resolveErrorCall(node) : getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray);
If produceDiagnostics is true, we just return anySignature (from resolveErrorCall) and don't get downstream errors. But if not, we get the best candidate we can (which happens to be the only one). Maybe we could just always getCandiateForOverloadFailure?

That PR didn't fix this, the line I pointed out still exists.

But I see error reported by running tsc as well as from language service so its fixed?

We get s: string, but there's no compile error when calling a method that doesn't exist on string -- because the diagnostics-producing TypeChecker has different behavior than the one used for services.

@sheetalkamat You probably don't have strictNullChecks enabled since getString(optional) should be an error.

Duplicate of #19686 .

authors: andy-ms sheetalkamat steadicat


text:
VSC Debugger quits immediately after launch

When I try to debug a Typescript Node.js file, the debugger appears to launch and then quit immediately. I have not intentionally performed any configuration on my project with regards to the debugger. The debugger works fine on ES6 Node projects.

We don't control the debugger behavior - probably need to find/log an issue on Microsoft/vscode

authors: RyanCavanaugh lukepighetti


text:
this type in constructor interface will not be extended in sub class

TypeScript Version:  3.3.0-dev.20181208

Search Terms: constructor interface this extends sub class
Code
interface AConstructor {
    new (): AInstance
    a(): this
}

interface AInstance {
    a: string
}

declare const A: AConstructor

declare function test<T extends typeof A>(a: T): T

class B extends A {
    b: string
}

const B1: typeof B = B.a() // Unexpected: Return type is AConstructor
const B2: typeof B = test(B) // Unexpected: Type parameter is inferred to AConstructor

Expected behavior:
The return type of B.a() and test(B) is typeof B.
Actual behavior:
The return type of B.a() and test(B) is AConstructor.
Playground Link:
https://www.typescriptlang.org/play/#src=interface AConstructor {
    new ()%3A AInstance
    a()%3A this
}

interface AInstance {
    a%3A string
}

declare const A%3A AConstructor

declare function test<T extends typeof A>(a%3A T)%3A T

class B extends A {
    b%3A string
}

const B1%3A typeof B %3D B.a() %2F%2F Unexpected%3A Return type is AConstructor
const B2%3A typeof B %3D test(B) %2F%2F Unexpected%3A Type parameter is inferred to AConstructor
Related Issues:
https://github.com/vuejs/vue-class-component/issues/294
Background: I've found this behaviour while investigating the above issue. This is caused by recent changes for Vue's type declaration. It looks like the extending class does not match with the decorator type because this type is still base constructor type.
I'm still not sure if my guess is correct. If it is not true, please just let me know about that.

It works when only interface involves.
interface AConstructor {
    new (): AInstance
    a(): this
}

interface AInstance {
    c: string
}

declare const A: AConstructor

declare function test<T extends AConstructor>(a: T): T

interface BConstructor extends AConstructor {
    b: string
}

declare const B: BConstructor

const B1: typeof B = B.a() // Good
const B2: typeof B = test(B) // Good

https://www.typescriptlang.org/play/#src=interface AConstructor {
    new ()%3A AInstance
    a()%3A this
}

interface AInstance {
    c%3A string
}

declare const A%3A AConstructor

declare function test<T extends AConstructor>(a%3A T)%3A T

interface BConstructor extends AConstructor {
    b%3A string
}

declare const B%3A BConstructor

const B1%3A typeof B %3D B.a() %2F%2F Unexpected%3A Return type is AConstructor
const B2%3A typeof B %3D test(B) %2F%2F Unexpected%3A Type parameter is inferred to AConstructor
I

Maybe it same as this issue https://github.com/Microsoft/TypeScript/issues/26206#issuecomment-411233513

I believe what you really want is #5863.

I would suggest patching over https://github.com/vuejs/vue/pull/8595 to return VueConstructor<V> instead of this.

...like in https://github.com/vuejs/vue/pull/9173 😄

Oh, I didn't realize #5863 is related. Thank you for pointing it out and suggestion!
Yes, it looks better to patch Vue side 🙂

authors: DanielRosenwasser HerringtonDarkholme fenying ktsn


text:
Is it possible to define a universal default generic type parameter so that a bottom object like new None(), can type check any type of None, such as None, None< ()=>any >?

In short, TypeScripts uses type {} for default generic type parameter, when T is not provided for new ClassA(...) so Applicative data structure would require developers more concious with types, which is a barrier for more advanced data structure.
Is it possible to define an universal default generic type so that a bottom datastructure like new None(), can type check any type of None, such as None<number>, None< ()=>any >?
Details:
I was trying to implement an Applicative data structure in TS as the Applicative of Haskell:
(Some f) <*> (Some x) = Some (f x)
(None) <*>(Some x) = None

First try is to implement functor/applicative  on Option and subclass Some and None.
Below is the type and class definition:
export const id = (a: any) => a

export interface Functor<T> {
  fmap(f: (a: T) => any): Functor<any>
}

export interface Applicative<T> extends Functor<T> {
  ffmap(af: Applicative<(a: T) => any>): Applicative<any>
}

export abstract class Option<T> implements Functor<T> {
  abstract _a: T | undefined

  abstract fmap(f: (a: T) => any): Functor<any>

  *[Symbol.iterator]() {
    yield this._a
  }
}

export class Some<T> extends Option<T> {
  _a: T

  constructor(a: T) {
    super()
    this._a = a
  }

  fmap(f: (a: T) => any): Option<any> {
    return new Some(f(this._a))
  }

  ffmap(a: Option<(a: T) => any>): Option<any> {
    if (a instanceof None) return new None()

    const f = a._a

    if (f === undefined || f === null) return new None()
    else return new Some(f!(this._a))
  }
}

export class None<T> extends Option<T> {
  _a: T | undefined
  constructor() {
    super()
    this._a = undefined
  }

  fmap(f: (a: T) => any): Option<any> {
    return new None()
  }

  ffmap(a: Option<(a: T) => any>): Option<any> {
    return new None()
  }
}

I have written some test cases and most work. However when test the case :
  test(' Some.ffmap(None) === None', () => {
    const a = new Some(33)

    const af = new None()

    expect(a.ffmap(af)).toEqual(new None())
  })

Following error is reported:
    src/index.test.ts:116:20 - error TS2345: Argument of type 'None<{}>' is not assignable to parameter of type 'Option<(a: number) => any>'.
      Types of property '_a' are incompatible.
        Type '{} | undefined' is not assignable to type '((a: number) => any) | undefined'.
          Type '{}' is not assignable to type '(a: number) => any'.
            Type '{}' provides no match for the signature '(a: number): any'.

    116     expect(a.ffmap(af)).toEqual(new None())

Spcifically, TS consider new None() has the type of new None<{}>(), which is no match with applicative parameter, new None< ()=>any>()
When I change the test case to the following, it works:
  test(' Some.fmap(None) = None', () => {
    const a = new None<number>()

    const f = (a: number) => a + 2

    expect(a.fmap(f)).toEqual(a)
  })

Did you try:
export class None extends Option<never> {
    …
}

You can defined a default type parameter as:
// Change any with the type you want to be the default.
export interface Functor<T = any> {
  fmap(f: (a: T) => any): Functor<any>
}

@jack-williams It doens't work.
@j-oliveras Your solution type checks. Thanks. I didn't know generic type parameter could have default type as well. Thanks.

authors: j-oliveras jack-williams reactma


text:
More granular CanvasRenderingContext2D style typing

I noticed that the typing for CanvasRenderingContext2D has the fillStyle and strokeStyle properties typed as any. The Canvas 2D context specification seems to suggest that this type could be narrowed to string | CanvasGradient | CanvasPattern. I'm not sure if the type was kept at any for a specific reason or if perhaps it just hadn't been updated since union types were introduced, but I'm happy to submit a PR if this would be a reasonable change.

These are actually generated from another data source, so we need to change that. @zhengbli might know more.

I agree it would be better to make it an union type instead of any, MDN said so too. Will fix soon.

authors: DanielRosenwasser dylanscott zhengbli


text:
All non-initalized Property Member Declarations aren't created in JavaScript

TypeScript Version:
1.8.6.0
Code
The [ Property Member Declarations Spec] (https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#84-property-member-declarations) shows the following ts example:
TypeScript Code:
class Employee {
    public name: string;
    public address: string;
    public retired = false;
    public manager: Employee = null;
    public reports: Employee[] = [];
}

However, when the ts file is compiled, all the non-initialized properties are missing from JavaScript.
Compiled code:
    var Employee = (function () {
        function Employee() {
            this.retired = false;
            this.manager = null;
            this.reports = [];
        }
        return Employee;
    }());

Notices that name and address are missing.
We discovered this the hard way. Our code declared a simple 'structure' with 2 of the 7 properties being initialized through the ctor() and the rest was initialized/set later in the code. The TS compiler gave no errors or warnings. But our applications crashed when it tried to set a non-initialized properties. For example:
var e = new Employee();
e.Name = "bob"; // Error: "Name is not a method on [object Object]"

Expected behavior:
That all properties that are defined (regardless of their initial state) be compiled to JS. We don't expect things to 'just' disappear.
Actual behavior:
All uninitialized properties are removed from JavaScript which then leads to run-time errors; and unexpected behavior.

Setting a property that doesn't exist yet doesn't generate a "Name is not a method on [object Object]" error. I'm not sure how you're getting that to appear (especially since Name isn't name...).
Class properties are not initialized by default because some people explicitly don't want that to happen, and some people do. If you want the properties to be initialized, provide an initializer.

Thanks for pointing out the typo, but the fact still remains.  If someone defines a class field/variable; then that filed should be reflected in the Javascript code.  Or at the vary lest, display a warning.  But to do nothing and let my application crash then what good is using a compile time code analysis if the code it generates isn't valid? We currently get this type of runtime checking from Javascript. The whole purpose for moving to TypeScript is to get something better,  not worse.

authors: RyanCavanaugh kabua


text:
Performance framework makes fourslash tests fail in runtests-browser

Run:
gulp runtests-browser --t='fourslash/commentsClassMembers.ts' --browser=chrome

Expected: the test passes
Actual: "TypeError: Illegal invocation at getCompletionData (bundle.js:54363)"
This line is a call to timestamp in performance.ts
In performance.ts, changing this line from
    export const timestamp = typeof performance !== "undefined" && performance.now ? performance.now : Date.now ? Date.now : () => +(new Date());

     export const timestamp = () => Date.now();

fixes the bug. Searching indicates that this error happens when you try to call an function without providing the expected this, like performance.now or Date.now. Node and Chrome are OK with ripping off Date.now, so I suspect it's performance.now.

@weswigham can you take a look and see if this is from a change your or @rbuckton made?

Actually, this change succeeds too:
    export const timestamp = typeof performance !== "undefined" && performance.now ? () => performance.now() : Date.now ? Date.now : () => +(new Date());

That seems like an actual fix. I'll send out a PR.


text:
Fix/enum error msg

Fixes #25896

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: Codextor sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

This is my first PR to TypeScript. Please suggest improvements.

authors: Codextor msftclas


text:
Instance of else clause

Fixes #1719.

@tinganho can you address the merge conflict?

What happened to the tsxAttributeResolution9 baselines?

@RyanCavanaugh I fixed the merge conflict. And tsxAttributeResolution9 doesn't appear as deleted anymore when I rebased my solution.

@mhegazy good with this?

:+1:

Sorry for the delay. :+1:

thanks!

:+1:

authors: DanielRosenwasser RyanCavanaugh mhegazy tinganho


text:
Unable to run my automation script by creating instance of WindowsDriver

I am unable to run my automation script using
WindowsDriver driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/"), capabilities);
But i am able to do with
RemoteWebDriver driver = new RemoteWebDriver (new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
what is the difference and why am i facing this issue. Missing anything?If i use the first one i will get error as
Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/remote/JsonException
at io.appium.java_client.remote.AppiumCommandExecutor.doExecute(AppiumCommandExecutor.java:110)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:162)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:88)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:112)
at io.appium.java_client.windows.WindowsDriver.(WindowsDriver.java:43)
at com.desktop.automation.pharmacy.Pharmacy.main(Test.java:28)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.remote.JsonException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more

Hi @Maohan1989,
When you run WinAppDriver.exe directly by itself without any argument, it will start a web server listening at http://127.0.0.1:4723/. When you are using Appium however, it will listen to http://127.0.0.1:4723/wd/hub as Appium internally runs WinAppDriver.exe and configures it to have the wd/hub prefix.

repo: Microsoft/WinAppDriver


text:
Update Xib2Nib logic removing UIRoundedRectButton as a separate class

We removed the subclassed UIRoundedRectButton from UIButton.mm in commit (87dd17bade). As a result, we need to remove the logic from Xib2Nib that relied on this class implementation
Fixes #1975

:shipit:

authors: jaredhms oliversa-msft

repo: Microsoft/WinObjC


text:
Fix some flakiness in NSURLConnection MultiRunLoop tests

Fixes #2730

This change is

Was unable to repro the NSURLSession test failures..

Everything passed ¯_(ツ)_/¯


text:
tab completion generates "command not found" errors

On a macOS host (v10.13.2), with the macOS copy of bash (in /bin/bash), attempting to tab-complete an appcenter command can lead to "command not found" errors.
Steps to reproduce:

install appcenter cli, via npm install -g appcenter-cli
setup tab completion for appcenter, via appcenter setup-autocomplete
start a new copy of bash
type in appcenter  (with the trailing space), then press tab

Observed results:
davidl@Wart ~ $ appcenter bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found

Expected result: no errors are displayed.
Additional notes: pressing tab again will display possible values.  Each additional tab press will also display these, albeit, prefixed with errors.  For example:
davidl@Wart ~ $ appcenter bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found
bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found

analytics           codepush            help                orgs                telemetry
apps                crashes             login               profile             test
build               distribute          logout              setup-autocomplete  tokens
davidl@Wart ~ $ appcenter bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found

analytics           codepush            help                orgs                telemetry
apps                crashes             login               profile             test
build               distribute          logout              setup-autocomplete  tokens
davidl@Wart ~ $ appcenter bash: _get_comp_words_by_ref: command not found
bash: __ltrim_colon_completions: command not found

analytics           codepush            help                orgs                telemetry
apps                crashes             login               profile             test
build               distribute          logout              setup-autocomplete  tokens
davidl@Wart ~ $ appcenter

Appcenter CLI version is reported as 1.0.6:
davidl@Wart ~ $ appcenter --version
appcenter version 1.0.6
davidl@Wart ~ $

Hey @DavidLudwig, thanks for reporting this bug. We've recorded it and working on it in the next sprint. Will update again when it's fixed

Hi @DavidLudwig ! The bug is now fixed in CLI v1.1.14

Hi @DavidLudwig, the bug fix is now deployed in CLI v1.1.14! Please download a new version of the CLI by running npm install -g appcenter-cli, and test this out. Let us know if you run into any issues!

authors: DavidLudwig amchew

repo: Microsoft/appcenter-cli


text:
Add support for custom binding

Add support for custom binding, for issue #559

@pragnagopa  Sorry for reply late, cases has been updated

@Flanker32 - we should also support
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@CustomBinding(direction = "in", name = "", type = "customBinding")
public @interface TestCustomBinding {
   String index();
   String path();
   String name();
}

In this case, name() on TestCustomBinding should override name given in customBinding

@pragnagopa It's a good idea that using CustomBinding to extends the binding model. But may I ask in what kind of scenario, the user needs to override the name, direction or type fields defined in @CustomBinding. So far, I didn't see the necessity for this kind of usage.

@pragnagopa Could you please take a look?

@pragnagopa It's a good idea that using CustomBinding to extends the binding model. But may I ask in what kind of scenario, the user needs to override the name, direction or type fields defined in @CustomBinding. So far, I didn't see the necessity for this kind of usage.

@jdneo The main scenario is to use CustomBinding to define annotations to be used in multiple places (therefore it is useful to control the name where the annotation is used). We've been asked to use CustomBinding to build annotations for SignalR Service. It's not possible to do this without support for overriding the name (overriding direction and type are not necessary), so this is currently a blocker for us.
Here's an example:
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@CustomBinding(direction = "out", name = "", type = "SignalR")
public @interface SignalR {
   String name();
   String hubName();
}

Usage:
@FunctionName("messages")
public void sendMessage(
        @HttpTrigger(
            name = "req",
            methods = { HttpMethod.POST },
            authLevel = AuthorizationLevel.ANONYMOUS)
            HttpRequestMessage<Object> req,
        @SignalR(name = "chatMessage", hubName = "chat") OutputBinding<SignalRMessage> chatMessage,
        @SignalR(name = "notificationMessage", hubName = "notification") OutputBinding<SignalRMessage> notificationMessage) {

    chatMessage.setValue(/* a chat message */);
    notificationMessage.setValue(/* a notification message */);
}

/cc @JialinXin @chenkennt @sffamily

@anthonychu Thank you for clarifying. Get your points now!

Currently, the plugin should be able to resolve CustomBinding and the annotations which are extended from CustomBinding. While from the implementation, we found that the logic needs to be refactored.
Considering Java GA is coming soon, we decide to put the refactoring work after GA. Tracking issue: #583

I just tested this out as well. It works great. Thanks for the quick work on this @jdneo
Updated this sample to use it:
https://github.com/Azure-Samples/signalr-service-quickstart-serverless-chat/blob/antchu/add-java/src/chat/java/src/main/java/com/function/Functions.java

@anthonychu Glad to know it works. I just make some tiny changes to the code to address the comment. Would you mind to try it again to make sure things go well?
@pragnagopa Regarding this PR, We found some problems. Could you please take a look?

https://github.com/Azure/azure-functions-java-library/issues/83
https://github.com/Azure/azure-functions-java-library/issues/69

authors: Flanker32 anthonychu jdneo pragnagopa

repo: Microsoft/azure-maven-plugins


text:
Dont perform which twice when check is true

Right now, if check is true we get the result of _which(tool, false) and then don't use that result if the tool is found. We should just short circuit there if the tool is found, rather than basically performing the _which an extra time

Can we add a test for this?

Can we add a test for this?

Functionally this shouldn't change behavior, so existing tests should provide the coverage we need. Beyond that, I'm not really sure what we'd be testing.

authors: damccorm stephenmichaelf

repo: Microsoft/azure-pipelines-task-lib


text:
Preventing maven-wrapper not to get ignored by git

adding this will show maven wrapper in git

@rajadilipkolli,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Codecov Report

Merging #108 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #108   +/-   ##
=====================================
  Coverage      48%    48%
=====================================
  Files          46     46
  Lines         879    879
  Branches       91     91
=====================================
  Hits          422    422
  Misses        416    416
  Partials       41     41

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 388f653...f6d3fdc. Read the comment docs.

authors: codecov-io msftclas rajadilipkolli

repo: Microsoft/azure-spring-boot-starters


text:
Clicking on the same element in the hamburger view should re-open that view, like the menu items do

Fixes #437.
Clicking on the same element in the hamburger view should re-open that view, like the menu items do
Description of the changes:
-Fixed the bug that was listed
How changes were validated:

-manual

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: cheezwhines sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Fixes #.
Clicking on the same element in the hamburger view should re-open that view, like the menu items do #437
Description of the changes:
-Fixed the bug that was listed
How changes were validated:
-manual

Congratulation on your first PR!
The PR description has some formatting issue, here is the fixed version:
## Fixes #437
Clicking on the same element in the hamburger view should re-open that view, like the menu items do.
### Description of the changes:
-Fixed the bug that was listed
### How changes were validated:
-manual

I also let some comments, don't hesitate to comment back if you have questions/feedback!
Good work!

I think I'm considering this a bug in the NavigationView control.  We can take the fix here and I'll pass on the bug to the controls team.

Controls bug is tracked by Microsoft/microsoft-ui-xaml#573

Hey @cheezwhines, can you address @rudyhuyn's simplification he suggested here? https://github.com/Microsoft/calculator/pull/447#discussion_r273354119

authors: cheezwhines danbelcher-MSFT msftclas rudyhuyn

repo: Microsoft/calculator


text:
Monaco Editor appears broken (console errors, failed load) with 0.7.0 update

On updating from 0.6.1 to 0.7.0, get issues on IE 11 (but not Chrome or Edge).  See image below.

monaco-editor npm version: 0.7.0
Browser: IE 11
OS: Windows 10

@Zlatkovsky Is it possible you were running into some caching issues?

Doesn't repro anymore.  Closing.

authors: Zlatkovsky alexandrudima

repo: Microsoft/monaco-editor


text:
Updated msbuild introduced build errors: MSB4057: The target "GetNativeManifest" does not exist in the project.

Steps to reproduce

My desktop uses 15.1.1012.6693 where I don't see MSB4057: The target "GetNativeManifest" does not exist in the project. I can successfully build with this setup.
AppVeyor is using 15.5.180.51428 and I see the issue.
My laptop uses 15.4.8.50001 and I see the same issue.

git clone https://github.com/microsoftgraph/msgraph-sdk-dotnet.git
Restore nuget packages.
Run msbuild or dotnet build.

This is the result:
"c:\repos\msgraph-sdk-dotnet\Microsoft.Graph.sln" (default target) (1) ->
"c:\repos\msgraph-sdk-dotnet\tests\Microsoft.Graph.Core.Test\Microsoft.Graph.Core.Test.csproj" (default target) (4) ->
"c:\repos\msgraph-sdk-dotnet\src\Microsoft.Graph.Core\Microsoft.Graph.Core.csproj" (GetNativeManifest target) (3:16) ->
  c:\repos\msgraph-sdk-dotnet\src\Microsoft.Graph.Core\Microsoft.Graph.Core.csproj : error MSB4057: The target "GetNativeManifest" does not exist in the project.

Expected  behavior
I expect that AppVeyor and my laptop build the libraries as it has successfully in the past, as my desktop currently does.
Actual behavior
Build fails with error MSB4057: The target "GetNativeManifest" does not exist in the project.
Environment data
On the laptop: msbuild /version output: 15.4.8.50001
OS info:
Desktop with 15.1.1012.6693 is on latest Windows Server (I don't have version, yet)
Laptop with 15.4.8.50001 is on Windows 10.0.16299.192
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
On the laptop: dotnet --version output: 2.1.4

msbuild  version 15.5.180 also raises " target "GetNativeManifest" does not exist in the project" error.
But cause is for stupid dublicate ProjectReference item.
IMHO, should be more user friendly error message with .csproj error line reference :-(
.Csproj like this:
  <ItemGroup>
    <ProjectReference Include="..\core\core.csproj" />
    <!-- GetNativeManifest fails? ?? no build error message?     -->
    <ProjectReference Include="..\core\core.csproj" />
    <!-- VisualStudion build fails?, uncomment here :(
    <Reference Include="core">
      <HintPath>..\core\bin\Debug\net47\core.dll</HintPath>
    </Reference>
    -->

I created sample solution: https://github.com/akrisiun/msbuild.ManifestProblem
dotnet build
ManifestProblem\src\netexe> dotnet build -v d
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Core

   1:9>Project "D:\Beta\Visual\ManifestProblem\src\netexe\netexe.csproj" (1:9) is building "D:\Beta\Visual\ManifestProblem\src\core\core.cs
roj" (2:19) on node 1 (GetNativeManifest target(s)).
  2:19>Building with tools version "15.0".
       Project file contains ToolsVersion="". This toolset may be unknown or missing, in which case you may be able to resolve this by inst
lling the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the p
oject as if it had ToolsVersion="15.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424.
  2:19>D:\Beta\Visual\ManifestProblem\src\core\core.csproj : error MSB4057: The target "GetNativeManifest" does not exist in the project.
  2:19>Done Building Project "D:\Beta\Visual\ManifestProblem\src\core\core.csproj" (GetNativeManifest target(s)) -- FAILED.

Duplicate of #2688
(that tracks your request, @akrisiun)

authors: MIchaelMainer akrisiun rainersigwald

repo: Microsoft/msbuild


text:
Make SSL certificate validation respect wildcards

Fixes issue #816.
Previously, we needed to use hostNameInCertificate when attempting to make SSL connections to Azure servers because the * (wildcard) character in the SSL certificate from Azure was being processed literally. This change makes it so that the wildcard is actually respected as "any characters".

Codecov Report

Merging #836 into dev will decrease coverage by 0.02%.
The diff coverage is 0%.

@@             Coverage Diff              @@
##                dev     #836      +/-   ##
============================================
- Coverage     48.31%   48.28%   -0.03%
+ Complexity     2782     2781       -1
============================================
  Files           116      116
  Lines         27878    27888      +10
  Branches       4651     4655       +4
============================================
- Hits          13468    13466       -2
- Misses        12190    12206      +16
+ Partials       2220     2216       -4

Flag
Coverage Δ
Complexity Δ

#JDBC42
47.83% <0%> (+0.02%)
2739 <0> (-2)
:arrow_down:

#JDBC43
48.2% <0%> (-0.04%)
2776 <0> (-2)

Impacted Files
Coverage Δ
Complexity Δ

...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java
54.42% <0%> (-0.07%)
0 <0> (ø)

...om/microsoft/sqlserver/jdbc/ReaderInputStream.java
43.95% <0%> (-1.1%)
15% <0%> (ø)

...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java
43.76% <0%> (-0.66%)
106% <0%> (ø)

...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java
38.57% <0%> (-0.44%)
43% <0%> (ø)

...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java
52.4% <0%> (-0.19%)
261% <0%> (-2%)

...oft/sqlserver/jdbc/SQLServerParameterMetaData.java
24.62% <0%> (+0.05%)
31% <0%> (ø)
:arrow_down:

...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java
62.34% <0%> (+0.11%)
0% <0%> (ø)
:arrow_down:

...n/java/com/microsoft/sqlserver/jdbc/DataTypes.java
79.48% <0%> (+0.19%)
5% <0%> (+1%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ce1475...725fc70. Read the comment docs.

@peterbae Please pull changes from PR https://github.com/peterbae/mssql-jdbc/pull/7/

authors: cheenamalhotra codecov-io peterbae

repo: Microsoft/mssql-jdbc


text:
Improve unit test loading / parsing error reporting (VS2013)

A few scenarios where it is difficult to tell why unit tests are not being found and appearing in Test Explorer, with no reported reason why:

no local mocha package - to repro, create a new console project, add the default mocha unit test template and select "Run All". No tests are loaded as mocha is not installed as a local module, no indication of this in the output window.

error during parsing / executing test files (e.g. syntax error, non-existent module, etc). For example:
  var assert = require('assert');

  describe('Test Suite 1', function () {
      require('non-existent-module');

      it('Test 1', function() {
          assert.ok(true, "This shouldn't fail");
      })
  })

The test in this file is not loaded, and no errors are reported to the output window.

Hey, regarding the first issue, did the following error not appear in the output window? If so, I can't reproduce it.

Repro:

new NTVS blank console project
add default mocha unit test
run all tests

Tests output window is empty.
Node tools version is 1.0.30324.01. Possibly only occurs with specific environment conditions, e.g. I use nvm-windows to switch between node versions, though it doesn't matter which node version I am using.

May have narrowed this down a little. I can't reproduce this on the first time I run all, but the second time (after the error is shown), the Tests output window is empty.

This seems to have been improved with VS2015 or by NTVS at some point.
If I introduce a syntax error in a unit test file, that is now clearly reported in the Tests output window:

The same if I introduce a runtime error:

In both cases, the text explorer window will not show these tests but the test output window will show what is wrong.

authors: danderson00 mjbvz mousetraps

repo: Microsoft/nodejstools


text:
Nodejs project fails when moved from VS2013 to VS2015 RTM

I just installed VS2015 Community RTM today. When I tried to open my small project: "Vb2Js", VS2015 failed with the message below. I'm a newbie with nodejs, only using it here for the file system for a local file conversion utility. What is wrong?  It still works if I use VS2013 Community.
Migration Report -
Overview
Project   Path                             Errors  Warnings Messages
Vb2Js    Vb2Js\Vb2Js.njsproj    1          0              0
Solution Vb2Js.sln                     0          0              1
Solution and projects
Vb2Js
Message
Vb2Js\Vb2Js.njsproj: The application which this project type is
based on was not found. Please try this link for further information:
http://go.microsoft.com/fwlink/?LinkId=558818&projecttype=9092AA53-FB77-4645-B42D-1CCCA6BD08BD
Solution
Message
Vb2Js.sln: The solution file does not require migration.

I found that I have to install Node.js Tools for Visual Studio as part of my installation of VS 2015 before my utility will work. It worked in VS 2013 without that, so I was unaware of that requirement. Still learning. The download page is https://www.visualstudio.com/en-us/features/node-js-vs.aspx.