プリインストール サービスが net.pipe://+/ 以下のハンドルを手放さなくてテストケースが発見できない
趣旨
RtDashService.exe が net.pipe://+/ という広範囲で名前付きパイプを触るせいで、他のアプリがその下の名前付きパイプを読めなくなるっぽい。その中には Visual Studio のテスト発見エンジンも含まれ、テストケースが Visual Studio で列挙されなくなる。
参考にした情報
<追記>
RtDashService は他のアプリにも迷惑を掛けている。
【Power Automate Desktop】「コンポーネント間の接続を確立できませんでした。」のメッセージが出て起動しない場合の対処方法 : パソコン・スマホの便利なツール情報
こちらのかたはやはり Sysinternals の handle.exe で
EbmV0LnBpcGU6Ly8rLw==を掴んでいるプロセスを探し、今回PowerAutomateが起動しない原因のプログラムはRtDashService.exeと特定できました
</追記>
経緯
あるとき Visual Studio の mstest なテストプロジェクトでテストケースが1個も発見されなくなった。
------ テストの探索が開始されました ------ クライアント プロキシを初期化できませんでした。テスト プロセス vstest.discoveryengine.x86.exe に接続できませんでした。
調査手順
参考記事の回答 42260672 に従い Process Explorer でハンドル net.pipe を検索したところ、こんなん出た

Microsoft.VisualStudio.Web.Host.exe (
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Microsoft.VisualStudio.Web.Host.exe)\Sessions\3\BaseNamedObjects\net.pipe:EbmV0LnBpcGU6Ly8rLzY3NkVERDMzLThEQjQtNENCNS1CM0FFLUQ2RjFFMTc0QkE3Qy8=RtDashService.exe (
c:\Program Files (x86)\Realtek\Realtek Windows NIC Driver\RtDashService\RtDashService.exe)\BaseNamedObjects\net.pipe:EbmV0LnBpcGU6Ly8rLw==vstest.discoveryengine.x86.exe (
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\Common7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.discoveryengine.x86.exe)\Sessions\3\BaseNamedObjects\net.pipe:EbmV0LnBpcGU6Ly8rL1ZTVEVTVC5ESVNDT1ZFUllFTkdJTkUvMjAyODgv
<追記>
EbmV0LnBpcGU6Ly8rLw== が何なのかというと、先頭のEを除いた bmV0LnBpcGU6Ly8rLw== を base64-decode すると net.pipe://+/ になり、どうやらローカルの名前付きパイプ全部?を指すっぽい。
</追記>
それとこれはどこかの何らかのログ
E, 21288, 54, 2023/10/02, 13:36:11.897, 3449172444582, devenv.exe, TestRunnerServiceClient: Could not connect to test runner service within the available time 60000. Reason:System.ServiceModel.EndpointNotFoundException: メッセージを受信できる net.pipe://**machine**/vstest.discoveryengine/20288 でリッスンしているエンドポイントがありませんでした。これは一般に、アドレスまたは SOAP アクションが正しくない場合に発生します。詳細については、InnerException を参照してください (ある場合)。
対処内容
DashClientService サービスを無効化したら似たようなことは起こらなくなった。
get rid of “you've launched an older version of firefox” after crash in Safe Mode
- I updated Firefox from (67.0+build2-0ubuntu0.18.04.1) to (67.0.1+build1-0ubuntu0.18.04.1).
- Firefox crashed three times in a row.
- I launched Firefox in safe mode but it crashed too.
- Firefox begun to refuse to run saying "you've launched an older version of firefox",
Using an older version of Firefox can corrupt bookmarks and browsing history already saved to an existing Firefox profile. To protect your information, create a new profile for this installation of Firefox.
This isn't in my case.
compatibility.iniin my profile folder was[Compatibility] LastVersion=Safe Mode LastOSABI=Linux_x86_64-gcc3 LastPlatformDir=/usr/lib/firefox LastAppDir=/usr/lib/firefox/browser
- I removed the line
LastVersion=Safe Mode. - I launched Firefox. It opened tabs successfully.
compatibility.inichanged to[Compatibility] LastVersion=67.0.1_20190530055249/20190530055249 LastOSABI=Linux_x86_64-gcc3 LastPlatformDir=/usr/lib/firefox LastAppDir=/usr/lib/firefox/browser
simple table of referrer policy
Source: compiled by me from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
the upper the stricter
|
Policy |
downgrade |
equal or more secure |
same origin |
|---|---|---|---|
|
|
no | no | no |
|
|
no | no | full |
|
|
no | origin | origin |
|
|
no | origin | full |
|
|
no | full | full |
|
|
origin | origin | origin |
|
|
origin | origin | full |
|
|
full | full | full |
legend:
| column name | means |
|---|---|
| downgrade | when requesting http resource from https |
| equal or more secure | having different origins and either of (http ← http or https ← http or https ← https) |
| same origin | when origins are equal |
| value | means |
|---|---|
| no | send nothing |
| origin | send only scheme, host, port |
| full | send the full URL |
広告を表示しなくても iOS 広告用識別子を使えた
広告を表示しないけれど、広告効果計測用のライブラリを使う iPhone アプリを作成しました。iTunes Connect にアップロードし審査へ提出するときの
このAppは広告ID(IDFA)を使用しますか?
が「はい」でも「いいえ」でも審査は通りました。 「はい」のときここらへんは多分チェックつけたはず:
- App内で広告を出す
- このAppのインストールを、前に出した広告と関連付ける
- このApp内で行われたアクションを、前に出した広告と関連付ける
Apple Developer Program License Agreement の 3.3.12節
Advertising Identifier: 3.3.12 You and Your Applications (and any third party with whom You have contracted to serve advertising) may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for the purpose of serving advertising. If a user resets the Advertising Identifier, then You agree not to combine, correlate, link or otherwise associate, either directly or indirectly, the prior Advertising Identifier and any derived information with the reset Advertising Identifier.
には “only for the purpose of serving advertising” とありますがこれが直接広告の画像なりテキストなりを app 内で表示することを指すわけではない、ということでしょうか。
一般的なアプリケーションの却下理由 - App Store - Apple Developer
アプリケーションで IDFA を使用していると答えたものの広告機能を備えていない、または広告が適切に表示されない場合は、アプリケーションが却下される可能性があります。
If you indicate that your app uses the IDFA, but it does not have ad functionality or does not display ads properly, your app may be rejected.
にある「広告機能」は広告表示に限らず、広告の効果測定のような、アプリを見て分からない機能も含むというということでしょうか。
それでは 2014年に英語や日本語でリジェクトされるぞって言っていたのは何だったのでしょう。
Appleのデベロッパに広告識別子の規則遵守が義務化, 違反者はApp Storeから拒絶される | TechCrunch Japan
ちなみに Android で使える Google Play 開発者サービスの Advertising ID はユーザーの分析に使えると書いてあります。
bitnami redmine と同じホストで git 連携する
目的
Bitnami 版 Redmine と同じホストの /git というパスで git リポジトリにHTTPアクセスできるようにする。 もちろん Redmine のプロジェクトのメンバー管理と連動して git リポジトリへのアクセス制限を掛ける。
git-http-backend を(mod_cgi.so が Apache に無かったので)fcgiwrap を使って FastCGI として実行することにした。
Bitnami 公式ドキュメントの手順 https://wiki.bitnami.com/Applications/BitNami_Redmine#How_to_configure_Redmine_for_advanced_integration_with_Git と比較すると、git.YOUR_DOMAIN_NAME とか別VirtualHost を切らなくていいし、htdocs 下に別の Passenger アプリ grack を置く必要もない(Apache の設定は詳しくないので別なやり方あれば教えてください……)。
なおリポジトリをこの Redmine 上で作成するために SCM Creator プラグイン を入れているが、たぶん無くても動作するのでここでは説明しない。
材料と道具
使用したバージョン
- Redmine 2.6.10 (bitnami-redmine-2.6.10-3-linux-ubuntu-14.04-x86_64)
- Apache 2.4.20
- fcgiwrap 1.1.0-2 (# sudo apt-get install fcgiwrap)
- (socat: デバッグするのに使う。)
- リポジトリは /opt/repositories/git 以下に置く
設定
fcgiwrap
apache (/opt/bitnami/apache2/bin/httpd.bin) プロセスが fcgiwrap の作るソケットに読み書きできるようにユーザ/グループを設定する。
/etc/default/fcgiwrap
FCGI_USER=daemon FCGI_GROUP=bitnami FCGI_SOCKET_OWNER=daemon FCGI_SOCKET_GROUP=daemon
httpd の設定
vcs.conf とか別ファイルに書いて /opt/bitnami/apache2/conf/httpd.conf から Include する。
<IfModule !perl_module>
LoadModule perl_module modules/mod_perl.so
</IfModule>
<IfModule !env_module>
LoadModule env_module modules/mod_env.so
</IfModule>
PerlLoadModule Apache::Authn::Redmine
# Subversionの設定
<Location /svn>
DAV svn
SVNParentPath /opt/repositories/svn
SVNListParentPath on
# 適当な内容の設定を置いてある
AuthzSVNAccessFile /usr/local/etc/svnauthz
AuthType Basic
AuthName "Subversion"
# http://www.redmine.org/boards/2/topics/35428
AuthUserFile /dev/null
Require valid-user
# Redmine プロジェクトのメンバー管理と連動したアクセス制御。
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
# /opt/bitnami/apps/redmine/htdocs/config/database.yml と同じ値にする。
RedmineDSN "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=/opt/bitnami/mysql/tmp/mysql.sock"
RedmineDbUser "bitnami"
RedmineDbPass "****"
</Location>
# Gitの設定
# bitnami の apache には mod_cgi.so が付属しないので CGI コマンドを直接実行できない。
<IfModule !proxy_module>
LoadModule proxy_module modules/mod_proxy.so
</IfModule>
<IfModule !proxy_fcgi_module>
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
</IfModule>
LogLevel trace2
# Alias を使い SCRIPT_FILENAME が git-http-backend を指すようにする。$1 は GIT_PROJECT_ROOT 下のディレクトリ名
AliasMatch "/git/(.+)" "/opt/bitnami/git/libexec/git-core/git-http-backend/$1"
<Location /git>
# SCRIPT_FILENAME 変数が proxy:fcgi://〜 で始まるというバグが Apache 2.4.20 の mod_proxy_fcgi にある。
# [Bug 59618 – SCRIPT_FILENAME is prefixed with bogus "proxy:fcgi"](https://bz.apache.org/bugzilla/show_bug.cgi?id=59618)
# そのため fcgiwrap が実行すべきコマンドが分からず
# Cannot get script name, are DOCUMENT_ROOT and SCRIPT_NAME (or SCRIPT_FILENAME) set and is the script executable?
# というエラーを返す。 https://github.com/gnosek/fcgiwrap/blob/master/fcgiwrap.c
# 一方 proxy:balancer: は除去するようになっているので balancer を経由するよう書けばよい:
SetHandler "proxy:balancer://fcgi59618workaround"
# バグ修正されたバージョンの Apache を使う場合こうなるはず:
#SetHandler "proxy:unix:/run/fcgiwrap.socket|fcgi://."
SetEnv GIT_HTTP_EXPORT_ALL ""
SetEnv GIT_PROJECT_ROOT "/opt/repositories/git"
AuthType Basic
AuthName "Git"
# http://www.redmine.org/boards/2/topics/35428
AuthUserFile /dev/null
Require valid-user
# Redmine プロジェクトのメンバー管理と連動したアクセス制御。
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
# /opt/bitnami/apps/redmine/htdocs/config/database.yml と同じ値にする。
RedmineDSN "DBI:mysql:database=bitnami_redmine;host=localhost;mysql_socket=/opt/bitnami/mysql/tmp/mysql.sock"
RedmineDbUser "bitnami"
RedmineDbPass "****"
RedmineGitSmartHttp yes
</Location>
# bug 59618 の回避策用の balancer を定義する。ここで決めた名前に proxy: をプレフィクスして上の SetHandler で参照している。
<Proxy "balancer://fcgi59618workaround">
# fcgiwrap は FCGI プロトコルをしゃべり、SCRIPT_FILENAME で指定された CGIコマンド を実行する。
# Unix domain socket を使う記法は https://httpd.apache.org/docs/2.4/en/mod/mod_proxy_fcgi.html のとおり。
# socat でデバッグするときはソケットの path を変更する。
BalancerMember "unix:/run/fcgiwrap.socket|fcgi://."
</Proxy>
モジュールの配置
mkdir -p /opt/bitnami/perl/lib/site_perl/5.16.3/Apache/Authn ln -sv /opt/bitnami/apps/redmine/htdocs/extra/svn/Redmine.pm /opt/bitnami/perl/lib/site_perl/5.16.3/Apache/Authn/Redmine.pm
おわりに
以上の設定で /opt/repositories/git/aaa を git clone http://(サーバ名)/git/aaa などと読み書きできるはず。
/opt/bitnami/apache2/conf/httpd.conf は大部分 bitnami の配布しているままだが、再現性の観点から載せとく。
/opt/bitnami/apache2/conf/httpd.conf
Apache で mod_proxy_fcgi と fcgiwrap を組み合わせる例もウェブ上には少ないので参考になると思う。
おまけ
FastCGI の unix domain socket 通信内容を見たい場合 socat を apt-get でインストールして
sudo socat -t100 -v unix-listen:/home/bitnami/fcgiwrap.socket,mode=777,reuseaddr,fork unix-connect:/run/fcgiwrap.socket > ~/fcgiwrap.log 2>&1 &
と起動しておいて上の vcs.conf で unix:/run/fcgiwrap.socket と書いてるとこを unix:/home/bitnami/fcgiwrap.socket と置き換えればよい。
ちなみに設定を書き換えたら sudo /opt/bitnami/ctlscript.sh restart apache で読みなおす必要がある。
SSL protocol error of Device Portal on Windows 10 Mobile
Device Portal of Windows 10 Mobile is now available on NuAns NEO but it's not usable. Browsers say “The connection to the server was reset while the page was loading.” This is not a kind of insecure-certificate problem.
update 2016-07-31: I found that the SNI servername other than "localhost" causes the error. So a workaround is to use USB connection with URL https://localhost:10443/ .
My NuAns NEO:
- Windows 10 Mobile, build 10.0.14393.5 (The problem exists since the first 10586 build which come to NuAns NEO as far as I can remember.)
- Firmware rev 1028.020.001.79
I've tested it with the openssl command.
C:> openssl s_client -connect 172.16.10.186:443
CONNECTED(00000003)
write:errno=104
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 306 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1469769595
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
The message lacks server certificate, cipher string and so on. I wonder what situation/configuration causes this. Like the phone vendor forgot to install something?
Using USB connection doesn't help because http://127.0.0.1:10080 redirects https page which emits the same erroneous message. cURL says unknown SSL protocol error:
C:> curl --verbose -i https://127.0.0.1:10443/ * STATE: INIT => CONNECT handle 0x600082340; line 1402 (connection #-5000) * Added connection 0. The cache now contains 1 members * Trying 127.0.0.1... * STATE: CONNECT => WAITCONNECT handle 0x600082340; line 1455 (connection #0) * Connected to 127.0.0.1 (127.0.0.1) port 10443 (#0) * STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600082340; line 1562 (connection #0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /usr/ssl/certs/ca-bundle.crt CApath: none * TLSv1.2 (OUT), TLS header, Certificate Status (22): * TLSv1.2 (OUT), TLS handshake, Client hello (1): * STATE: SENDPROTOCONNECT => PROTOCONNECT handle 0x600082340; line 1576 (connection #0) * Unknown SSL protocol error in connection to 127.0.0.1:10443 * multi_done * Closing connection 0 * The cache now contains 0 members * Expire cleared curl: (35) Unknown SSL protocol error in connection to 127.0.0.1:10443
In contrast, connection to another phone Lumia 1520 succeeds as follows.
C:> openssl s_client -connect 172.16.10.5:443
CONNECTED(00000003)
depth=0 CN = 172.16.10.5
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = 172.16.10.5
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:/CN=172.16.10.5
i:/CN=Microsoft Windows Web Management (Test) (Windows-Phone)
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDYzCCAkugAwIBAgII/x+R…
-----END CERTIFICATE-----
subject=/CN=172.16.10.5
issuer=/CN=Microsoft Windows Web Management (Test) (Windows-Phone)
---
No client certificate CA names sent
Peer signing digest: SHA256
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 1355 bytes and written 432 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: 1324…
Session-ID-ctx:
Master-Key: 2818…
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 146976…
Timeout : 300 (sec)
Verify return code: 21 (unable to verify the first certificate)
---
read:errno=104