mystasly48 / nowplayingforspotify Goto Github PK
View Code? Open in Web Editor NEWNowPlaying tweet application for Spotify!
License: GNU Lesser General Public License v3.0
NowPlaying tweet application for Spotify!
License: GNU Lesser General Public License v3.0
ソフトウェア起動時に発生しました。
スタートアッププログラムに入れており、パソコン起動直後での起動でした。
以下がエラー時の画像とエラー文です。
Just-In-Time (JIT) デバッグを呼び出すための詳細については、
ダイアログ ボックスではなく、このメッセージの最後を参照してください。
************** 例外テキスト **************
System.Net.WebException: リモート サーバーがエラーを返しました: (401) 許可されていません
場所 System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
場所 System.Net.WebClient.DownloadString(Uri address)
場所 System.Net.WebClient.DownloadString(String address)
場所 SpotifyAPI.Local.RemoteHandler.GetOAuthKey()
場所 SpotifyAPI.Local.RemoteHandler.Init()
場所 NowPlayingForSpotify.MainForm.SpotifyInit() 場所 D:\Programming\C#\WinForm\NowPlayingForSpotify\NowPlayingForSpotify\MainForm.cs:行 306
場所 NowPlayingForSpotify.MainForm.init() 場所 D:\Programming\C#\WinForm\NowPlayingForSpotify\NowPlayingForSpotify\MainForm.cs:行 55
場所 NowPlayingForSpotify.MainForm.MainForm_Load(Object sender, EventArgs e) 場所 D:\Programming\C#\WinForm\NowPlayingForSpotify\NowPlayingForSpotify\MainForm.cs:行 115
場所 System.Windows.Forms.Form.OnLoad(EventArgs e)
場所 System.Windows.Forms.Form.OnCreateControl()
場所 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
場所 System.Windows.Forms.Control.CreateControl()
場所 System.Windows.Forms.Control.WmShowWindow(Message& m)
場所 System.Windows.Forms.Control.WndProc(Message& m)
場所 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
場所 System.Windows.Forms.Form.WmShowWindow(Message& m)
場所 System.Windows.Forms.Form.WndProc(Message& m)
場所 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
場所 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
場所 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 読み込まれたアセンブリ **************
mscorlib
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
NowPlayingForSpotify
アセンブリ バージョン:1.0.0.0
Win32 バージョン:1.0.0.0
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/NowPlayingForSpotify.exe
----------------------------------------
System.Windows.Forms
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
SpotifyAPI
アセンブリ バージョン:1.0.0.0
Win32 バージョン:1.0.0.0
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/SpotifyAPI.DLL
----------------------------------------
NowPlayingForSpotify.resources
アセンブリ バージョン:1.0.0.0
Win32 バージョン:1.0.0.0
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/ja/NowPlayingForSpotify.resources.DLL
----------------------------------------
System.Configuration
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CoreTweet
アセンブリ バージョン:0.7.2.352
Win32 バージョン:0.7.2.352
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/CoreTweet.DLL
----------------------------------------
Newtonsoft.Json
アセンブリ バージョン:9.0.0.0
Win32 バージョン:9.0.1.19813
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/Newtonsoft.Json.DLL
----------------------------------------
System.resources
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_ja_b77a5c561934e089/System.resources.dll
----------------------------------------
System.Windows.Forms.resources
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_ja_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ja_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
************** JIT デバッグ **************
Just-In-Time (JIT) デバッグを有効にするには、このアプリケーション、
またはコンピューター (machine.config) の構成ファイルの jitDebugging
値を system.windows.forms セクションで設定しなければなりません。
アプリケーションはまた、デバッグを有効にしてコンパイルされなければ
なりません。
例:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
JIT デバッグが有効なときは、このダイアログ ボックスで処理するよりも、
ハンドルされていない例外はすべてコンピューターに登録された
JIT デバッガーに設定されなければなりません。
条件も理由もまだ全く分からない状態です。
突然、イベントが発生しなくなり、その影響でトラックのアップデートもしなくなり、全機能が停止します。
アプリケーションを再起動すればまた普通に動きます。
API側の問題なのか、こちら側の問題なのか。普通に仕様であり何かで解決ができるのか、普通に不具合なのか。そこまでも分かりません。
早期解決に全力を尽くします。
以下に対象のトラックとスクリーンショット、エラー全文を貼ります。
Title; Yesterday - Remastered 2015
Artist: The Beatles
Album: 1 (Remastered)
https://open.spotify.com/track/4E5rL7YL0hVUPqeMSpjEF2
Just-In-Time (JIT) デバッグを呼び出すための詳細については、
ダイアログ ボックスではなく、このメッセージの最後を参照してください。
************** 例外テキスト **************
System.Net.WebException: リモート名を解決できませんでした。: 'open.spotify.com'
場所 System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
場所 System.Net.WebClient.DownloadString(Uri address)
場所 System.Net.WebClient.DownloadString(String address)
場所 SpotifyAPI.Local.Models.Track.GetAlbumArtUrl(AlbumArtSize size)
場所 SpotifyAPI.Local.Models.Track.<GetAlbumArtAsync>d__22.MoveNext()
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
場所 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
場所 NowPlayingForSpotify.MainForm.<UpdateTrack>d__43.MoveNext() 場所 D:\Programming\C#\WinForm\NowPlayingForSpotify\NowPlayingForSpotify\MainForm.cs:行 350
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
場所 System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
************** 読み込まれたアセンブリ **************
mscorlib
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
NowPlayingForSpotify
アセンブリ バージョン:1.0.0.0
Win32 バージョン:1.0.0.0
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/NowPlayingForSpotify.exe
----------------------------------------
System.Windows.Forms
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
SpotifyAPI
アセンブリ バージョン:1.0.0.0
Win32 バージョン:1.0.0.0
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/SpotifyAPI.DLL
----------------------------------------
NowPlayingForSpotify.resources
アセンブリ バージョン:1.0.0.0
Win32 バージョン:1.0.0.0
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/ja/NowPlayingForSpotify.resources.DLL
----------------------------------------
System.Configuration
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
CoreTweet
アセンブリ バージョン:0.7.2.352
Win32 バージョン:0.7.2.352
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/CoreTweet.DLL
----------------------------------------
Newtonsoft.Json
アセンブリ バージョン:9.0.0.0
Win32 バージョン:9.0.1.19813
コードベース:file:///D:/Programming/C%23/WinForm/NowPlayingForSpotify/NowPlayingForSpotify/bin/Release/Newtonsoft.Json.DLL
----------------------------------------
System.Numerics
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Runtime.Serialization
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Xml.Linq
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Data
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
mscorlib.resources
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ja_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.resources
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_ja_b77a5c561934e089/System.resources.dll
----------------------------------------
System.Windows.Forms.resources
アセンブリ バージョン:4.0.0.0
Win32 バージョン:4.6.1586.0 built by: NETFXREL2
コードベース:file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_ja_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
************** JIT デバッグ **************
Just-In-Time (JIT) デバッグを有効にするには、このアプリケーション、
またはコンピューター (machine.config) の構成ファイルの jitDebugging
値を system.windows.forms セクションで設定しなければなりません。
アプリケーションはまた、デバッグを有効にしてコンパイルされなければ
なりません。
例:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
JIT デバッグが有効なときは、このダイアログ ボックスで処理するよりも、
ハンドルされていない例外はすべてコンピューターに登録された
JIT デバッガーに設定されなければなりません。
This application fully stopped due to changed Spotify API and SpotifyAPI-NET.
We have to support new version of API.
日本語の含まれているトラック(例:きゃりーぱみゅぱみゅ)を再生すると、トラックの更新が停止しNowPlayingのツイートどころかソフトウェア上に表示すらされなくなります。
また、日本語の含まれているトラックを再生または選択している状態でソフトウェアを起動すると、JsonReaderExceptionが発生することが判明しました。 #4
API側で日本語に対応していないことが原因かと思われますが、私側での対処方法が分からないため現在は放置という形になっています。
ローカル(iTunesなど)の曲を再生しても反応はするのですが、トラック名やアーティスト名、アルバム名が表示されるものの、アルバム画像は取得できず No Image も表示されず。
NowPlayingのツイートに添付されるSpotifyのリンクも謎のグチャグチャリンク。
再生されている曲がローカルの曲であることを判定して、別途の処理をする必要がありそう。
SpotifyLocalAPI.GetStatus()
で Newtonsoft.Json.dll
より JsonReaderException
が発生します。
内容は
After parsing a value an unexpected character was encountered: u. Path '[0].track.track_resource.name', line 13, position 5.
です。
Spotify は起動しており、トラック再生中です。
再生を停止しても、Spotifyを再起動してもエラーは出ました。
何度か連続で起動を試してもエラーは出続け、少し時間を置いたら出ませんでした。
「自動で通知領域に隠して起動」とは、起動する際にウィンドウ(フォーム)を表示させないで、右下の通知領域に隠した状態で起動をさせるもの。
仕組み上、MainFormが呼び出されてから、SplashScreenが呼び出されて、MainFormに返ってくるため、まずSplashScreenを非表示にして、MainFormも非表示にし、通知領域に表示という手順になるのだが・・・。
MainForm_Load
イベントのタイミングで this.Hide();
や this.Visible = false;
などを実行しても適用されず、MainForm_Shown
イベントのタイミングで実行する必要が出た。
だが、Shown という言葉から察せるように、「一瞬だけフォームが見えちゃう」という問題が新しく出た。
this.Opacity = 0;
という方法もあったが、これも変わらず。(だった気がする)
とにかく、思ってた以上に実装が面倒臭かったので、一時的に廃止とする。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.