Google Playで課金実装していないのに、「アプリ内課金あり」と表示されてしまう

Google Play アプリ内課金あり

実装環境

  • Unity2021.3.14f1
  • Firebase10.3.0
  • AdMob7.20

上記のように課金機能を実装していないのに、「アプリ内課金あり」と表示されてしまいました。
※しかもなぜか、PCのブラウザでGooglePlayを見ると「アプリ内課金あり」は表示されませんでした。

FirebaseやAdMobを入れた際になんらかの原因で課金ありと認識されてしまった可能性がないか調べたところ、Unity Package Managerから、In App Purchasingを削除したところ、無事GooglePlayから「アプリ内課金あり」は消えていました。

AndroidManifest.xmlの下記パーミッションを削除すれば解消されるケースもあるようですが、自分の場合はもともとBILLINGパーミッションの記載はなかったのでこちらの方法にいきつきました。

<uses-permission android:name="com.android.vending.BILLING" />

参考になれば嬉しいです。

php7系でcomposer installするとOpenSSL Error

症状

php5.6のCentOSサーバーでcomposer installしようとしたら下記エラーがでた。

[Composer\Downloader\TransportException]                                                                                           
  The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:  
  error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed                                                  
  Failed to enable crypto                                                                                                            
  failed to open stream: operation failed

ググったところ、仮想マシンの再起動や、php.iniファイルに
openssl.cafile=/etc/ssl/certs/ca-bundle.crt

を追記すると治るケースがあるという情報がありましたがどちかも解決しませんでした。

改善した方法

結果下記で改善されました。

$ sudo yum install ca-certificates

※nginxやphp-fpm等の再起動も反映には必要かもしれません。

その後 composer installが通るようになりました。


Laravel デバッグTIPS

php側

web画面で、dump($arr)で配列やオブジェクトの中身をチェックする

dump($obj);

web画面でデバッグ表示できない場合はlogファイルに出力

Log::debug(__FILE__ . __LINE__ . $str);

storage/log/〜に出力される。

頭にスラッシュをつけると、use LogしなくてOKっぽい

use Log;
↓
\Log::info();
// ログに配列を展開して吐き出す
Log::debug(print_r($arr, true));

// オブジェクトも可能
Log::debug(print_r($object, true));

view上(blade)でデバッグ

{{dd($arr)}}

SQLの確認

$sql = DB::table('users')
            ->where('status', '<>', 1)
            ->toSql();
var_dump($sql);

git ローカルブランチ名を変更

ローカルブランチ名を変更

$ git branch -m [変更前ブランチ名] [変更したいブランチ名]

変更イメージ

$ git branch // ローカルブランチ確認
  feature/#1_bugphenix
* master
$ git branch -m feature/#1_bugphenix feature/#1_bugfix
$ git branch
  feature/#1_bugfix
* master

こうなります。

git ローカルのブランチを削除する

ローカルブランチの確認

$ git branch
  feature/#1_bugphenix
* master

ローカルブランチの削除

git branch --delete feature/#1_bugphenix

※削除しようとしているブランチにいる状態で削除コマンド打つと下記エラーになるので、
別ブランチに移動しておく
error: Cannot delete branch 'feature/#1_bugphenix' checked out at '/Users/hoge/Dev/sandbox/test'

chromeブラウザで、SSLに対応したページが急にエラーエラーになって見れなくなった。

接続は完全に保護されていません

少しまでまで問題なく見れていたhttpsのページが下記のように見れなくなった。

接続は完全に保護されていません

chromeの検証でエラーを見てみると。

The connection used to load resources from https://example.com used TLS 1.0 or TLS1.1, which are deprecated and will be disabled in the future. Once disabled, users will be prevented from loading these resources. The server sould enable TLS 1.2 or later. See https://www.chromestatus.com/feature/〜 for more information.

Google翻訳してみると

https://example.comからリソースをロードするために使用された接続はTLS 1.0またはTLS1.1を使用しました。これらは非推奨であり、将来的には無効になる予定です。無効にすると、ユーザーはこれらのリソースを読み込めなくなります。サーバーはTLS 1.2以降を有効にする必要があります。詳しくは、https://www.chromestatus.com/feature/〜をご覧ください。

TLS 1.2が有効になっていない…

nginxの設定を確認してみると見事に設定が抜けている。

設定例:/etc/nginx/conf.d/example.com.conf
〜
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
〜

TLSv1とv1.1も消した方がいいがしますが、一応これで
nginxをreloadしてみると、

# systemctl reload nginx

解決!

CentOS8で無料SSLに(Let’s Encrypt)

SSLの設定

# dnf install -y epel-release
# dnf install certbot python3-certbot-nginx

対話式でメアド等必要な情報を入力

# certbot --nginx

nginxのconfファイルに自動でsslの情報等が記入されるので、

nginxのconfファイルのチェック
# nginx -t
問題なければ sslの変更内容をnginxに反映
# systemctl reload nginx

あとはブラウザで確認すればOK

SSLの自動更新設定

echo "0 0,12 * * * root python3 -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q" | sudo tee -a /etc/crontab > /dev/null

参考サイト:
https://qiita.com/matsuyoro/items/65fb8de2e7197e2ed472
https://certbot.eff.org/lets-encrypt/centosrhel8-nginx

Xcodeビルド時に「Undefined Symbol: method descriptor for Swift.CustomStringConvertible.des…」

Unity製のアプリをXcodeビルド時にみたことないエラーが大量に。

エラー100件…

エラー内容↓
Showing Recent Issues
Undefined symbol: method descriptor for Swift.CustomStringConvertible.description.getter : Swift.String

Undefined symbol: protocol descriptor for Swift.CustomStringConvertible

Undefined symbol: __swiftEmptyDictionarySingleton

Undefined symbol: _swift_errorRelease

Undefined symbol: method descriptor for Swift.Error._userInfo.getter : Swift.AnyObject?

Undefined symbol: method descriptor for Swift.Error._code.getter : Swift.Int

Undefined symbol: method descriptor for Swift.Error._getEmbeddedNSError() -> Swift.AnyObject?

Undefined symbol: (extension in Foundation):Swift.Error< where A: Foundation.CustomNSError>._code.getter : Swift.Int

Undefined symbol: protocol conformance descriptor for Swift.Int : Swift.FixedWidthInteger in Swift

Undefined symbol: type metadata for Any

Undefined symbol: type metadata for Swift.Int

Undefined symbol: method descriptor for Foundation._ObjectiveCBridgeableError.init(_bridgedNSError: __shared __C.NSError) -> A?

Undefined symbol: base conformance descriptor for Foundation._BridgedStoredNSError: Swift.Hashable

Undefined symbol: (extension in Foundation):Foundation._BridgedStoredNSError.errorCode.getter : Swift.Int

Undefined symbol: (extension in Foundation):Foundation._BridgedStoredNSError._getEmbeddedNSError() -> Swift.AnyObject?

Undefined symbol: base conformance descriptor for Foundation._BridgedStoredNSError: Foundation.CustomNSError

Undefined symbol: method descriptor for Foundation._BridgedStoredNSError.init(_nsError: __C.NSError) -> A

Undefined symbol: associated conformance descriptor for Foundation._BridgedStoredNSError.Code: Swift.RawRepresentable

Undefined symbol: associated conformance descriptor for Foundation._ErrorCodeProtocol._ErrorType: Foundation._BridgedStoredNSError

Undefined symbol: protocol descriptor for Foundation._ErrorCodeProtocol

Undefined symbol: _swift_bridgeObjectRetain

Undefined symbol: associated conformance descriptor for Swift.ExpressibleByStringLiteral.StringLiteralType: Swift._ExpressibleByBuiltinStringLiteral

Undefined symbol: method descriptor for Foundation.CustomNSError.errorCode.getter : Swift.Int

Undefined symbol: (extension in Foundation):Foundation._BridgedStoredNSError.hash(into: inout Swift.Hasher) -> ()

Undefined symbol: _swift_getObjCClassFromMetadata

Undefined symbol: associated type descriptor for _ErrorType

Undefined symbol: method descriptor for Swift.ExpressibleByExtendedGraphemeClusterLiteral.init(extendedGraphemeClusterLiteral: A.ExtendedGraphemeClusterLiteralType) -> A

Undefined symbol: protocol descriptor for Swift.ExpressibleByUnicodeScalarLiteral

Undefined symbol: (extension in Foundation):Foundation._BridgedStoredNSError.errorUserInfo.getter : [Swift.String : Any]

Undefined symbol: method descriptor for Foundation._BridgedStoredNSError._nsError.getter : __C.NSError

Undefined symbol: base conformance descriptor for Swift.ExpressibleByStringLiteral: Swift.ExpressibleByExtendedGraphemeClusterLiteral

Undefined symbol: (extension in Foundation):Swift.Error< where A: Foundation.CustomNSError>._domain.getter : Swift.String

Undefined symbol: (extension in Foundation):Foundation._BridgedStoredNSError.init(_bridgedNSError: __C.NSError) -> A?

Undefined symbol: method descriptor for Swift.ExpressibleByStringLiteral.init(stringLiteral: A.StringLiteralType) -> A

Undefined symbol: protocol witness table for Swift.String : Swift._ExpressibleByBuiltinExtendedGraphemeClusterLiteral in Swift

Undefined symbol: protocol witness table for Swift.String : Swift._ExpressibleByBuiltinStringLiteral in Swift

Undefined symbol: base conformance descriptor for Foundation.CustomNSError: Swift.Error

Undefined symbol: _swift_unknownObjectRetain

Undefined symbol: static Swift._DictionaryStorage.allocate(capacity: Swift.Int) -> Swift._DictionaryStorage<A, B>

Undefined symbol: protocol descriptor for Foundation.CustomNSError

Undefined symbol: _swift_initStaticObject

Undefined symbol: Swift._findStringSwitchCaseWithCache(cases: [Swift.StaticString], string: Swift.String, cache: inout Swift._OpaqueStringSwitchCache) -> Swift.Int

Undefined symbol: type metadata for Swift.StaticString

Undefined symbol: _swift_getWitnessTable

Undefined symbol: Swift.Hasher._combine(Swift.UInt) -> ()

Undefined symbol: Swift._StringObject.rawBits.getter : (Swift.UInt64, Swift.UInt64)

Undefined symbol: method descriptor for static Swift._ObjectiveCBridgeable._unconditionallyBridgeFromObjectiveC(A._ObjectiveCType?) -> A

Undefined symbol: associated type descriptor for ExtendedGraphemeClusterLiteralType

Undefined symbol: __swiftEmptyArrayStorage

Undefined symbol: associated type descriptor for UnicodeScalarLiteralType

Undefined symbol: protocol descriptor for Swift._HasCustomAnyHashableRepresentation

Undefined symbol: protocol descriptor for Swift.ExpressibleByExtendedGraphemeClusterLiteral

Undefined symbol: _swift_errorRetain

Undefined symbol: method descriptor for Swift.RawRepresentable.init(rawValue: A.RawValue) -> A?

Undefined symbol: method descriptor for static Swift._ObjectiveCBridgeable._conditionallyBridgeFromObjectiveC(_: A._ObjectiveCType, result: inout A?) -> Swift.Bool

Undefined symbol: Swift.Hasher.init(_seed: Swift.Int) -> Swift.Hasher

Undefined symbol: method descriptor for static Swift._ObjectiveCBridgeable._forceBridgeFromObjectiveC(_: A._ObjectiveCType, result: inout A?) -> ()

Undefined symbol: protocol descriptor for Swift._ObjectiveCBridgeable

Undefined symbol: value witness table for Builtin.Int32

Undefined symbol: base conformance descriptor for Swift._SwiftNewtypeWrapper: Swift._HasCustomAnyHashableRepresentation

Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements

Undefined symbol: static (extension in Foundation):Foundation._BridgedStoredNSError.== infix(A, A) -> Swift.Bool

Undefined symbol: protocol descriptor for Swift.ExpressibleByStringLiteral

Undefined symbol: base conformance descriptor for Swift._SwiftNewtypeWrapper: Swift.RawRepresentable

Undefined symbol: (extension in Foundation):Foundation._BridgedStoredNSError.init(_: A.Code, userInfo: [Swift.String : Any]) -> A

Undefined symbol: protocol descriptor for Swift._SwiftNewtypeWrapper

Undefined symbol: method descriptor for Swift.Error._domain.getter : Swift.String

Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility50

Undefined symbol: protocol descriptor for Swift.RawRepresentable

Undefined symbol: method descriptor for static Foundation.CustomNSError.errorDomain.getter : Swift.String

Undefined symbol: (extension in Foundation):Swift.String._bridgeToObjectiveC() -> __C.NSString

Undefined symbol: Swift.String.hashValue.getter : Swift.Int

Undefined symbol: protocol descriptor for Swift.Equatable

Undefined symbol: base conformance descriptor for Swift.Hashable: Swift.Equatable

Undefined symbol: _swift_arrayDestroy

Undefined symbol: _swift_retain

Undefined symbol: protocol witness table for Swift.String : Swift.Hashable in Swift

Undefined symbol: (extension in Swift):Swift.Error._userInfo.getter : Swift.AnyObject?

Undefined symbol: protocol descriptor for Swift.Hashable

Undefined symbol: associated conformance descriptor for Swift.ExpressibleByUnicodeScalarLiteral.UnicodeScalarLiteralType: Swift._ExpressibleByBuiltinUnicodeScalarLiteral

Undefined symbol: method descriptor for Foundation.CustomNSError.errorUserInfo.getter : [Swift.String : Any]

Undefined symbol: associated type descriptor for StringLiteralType

Undefined symbol: static (extension in Foundation):Swift.String._conditionallyBridgeFromObjectiveC(_: __C.NSString, result: inout Swift.String?) -> Swift.Bool

Undefined symbol: static (extension in Foundation):Swift.String._forceBridgeFromObjectiveC(_: __C.NSString, result: inout Swift.String?) -> ()

Undefined symbol: protocol witness table for Swift.String : Swift._ExpressibleByBuiltinUnicodeScalarLiteral in Swift

Undefined symbol: method descriptor for Swift.Hashable.hashValue.getter : Swift.Int

Undefined symbol: type metadata accessor for Swift._ContiguousArrayStorage

Undefined symbol: protocol descriptor for Swift.Error

Undefined symbol: method descriptor for Swift._ObjectiveCBridgeable._bridgeToObjectiveC() -> A._ObjectiveCType

Undefined symbol: method descriptor for Swift.RawRepresentable.rawValue.getter : A.RawValue

Undefined symbol: _swift_allocObject

Undefined symbol: associated conformance descriptor for Foundation._BridgedStoredNSError.Code: Foundation._ErrorCodeProtocol

Undefined symbol: base conformance descriptor for Foundation._ErrorCodeProtocol: Swift.Equatable

Undefined symbol: static Swift._SetStorage.resize(original: Swift.__RawSetStorage, capacity: Swift.Int, move: Swift.Bool) -> Swift._SetStorage<A>

Undefined symbol: static (extension in Foundation):Swift.Set._unconditionallyBridgeFromObjectiveC(__C.NSSet?) -> Swift.Set<A>

Undefined symbol: associated type descriptor for Code

Undefined symbol: Swift.ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS(Any.Type) -> Swift.Never

Undefined symbol: method descriptor for Swift.Hashable.hash(into: inout Swift.Hasher) -> ()

Undefined symbol: associated conformance descriptor for Swift.ExpressibleByExtendedGraphemeClusterLiteral.ExtendedGraphemeClusterLiteralType: Swift._ExpressibleByBuiltinExtendedGraphemeClusterLiteral

Undefined symbol: Swift.Hasher._finalize() -> Swift.Int

なんのこっちゃと思いググったら、あった。

参考サイト:https://github.com/mxcl/PromiseKit/issues/1059
m(_ _)m

この手順どおりに、作ったプロジェクトファイル内に、swiftファイルをただ作る。

そして作る際に、「Create Bridging Header」を選択

下記のように空のswiftファイルが追加されていればOK

ビルドしてみると、、、、!通った!

あっぱれ!

CentOS8にagコマンド(the_silver_searcher)をインストール

CentOS8 silver seacher

取り急ぎCentOS8、下記でsilver searcherをインストールできた。

$ sudo dnf install https://dl.bintray.com/subchen/yum-repo/the_silver_searcher-2.1.0-1.el8.x86_64.rpm

環境

  • CentOS Linux release 8.2.2004 (Core)
  • GCP

参考サイト:
https://gist.github.com/rkaneko/988c3964a3177eb69b75

ググっても中々CentOS8では簡単にインストールする方法見つからなかったので、上記サイトがとても参考になった。

auひかり→Nuro光 for マンション切り替えた話

回線速度

インターネット環境が非常に良くなったので記録。
※個人の感想です!キャンペーンなどは期間により変動する可能性があるので、公式サイトをみてください。

googleのspeed testをしたら驚異高速化!

Wifi環境での計測結果です。

最近zoomなどの会議でよく遅延や途切れが発生し、またルーターが原因の可能性もありますが、よく回線が切れ、ルーターを1日2,3回再起動する日々が続いていました。ただNuroに切り替えた瞬間この回線速度アップ&コスト削減には驚いたので、
まわしものでもなんでもないですが、この快適さを共有したくw

切り替え前(auひかり)

プラン

  • So-net 光 (auひかり)マンションV16(お得プランA)
  • オプション-auひかり電話

費用

  • 月額合計:4700円程度(微妙に変動します)

速度

回線速度テスト

※回線速度の計測はgoogleのspeedtestで計測
https://www.google.com/search?q=speedtest&oq=spped&aqs=chrome.1.69i57j0l7.1848j0j7&sourceid=chrome&ie=UTF-8
  • アップロード12Mbps
  • ダウンロード5.51Mbps

切り替え後(Nuro)

プラン

  • Nuro光 for マンション
    ※Nuro for マンションミニとは別ものです、NURO 光 for マンションの場合、マンションにすでにNURO 光の設備が導入されている必要があったり、4世帯以上の利用者が必要だったりなど、いくつかの条件があるようです
  • オプション-電話
    ※電話にも着信のオプションなどありますが、今回は全部つけず電話ができればよい程度で契約。

費用

  • インターネット2400円/月
  • 電話 500円/月
    合計2900円程度

回線速度

回線速度
  • ダウンロード 453Mbps
  • アップロード 272.0Mbps

結果

  • 月額1500円も以上もお得になった(年間で考えると18000円)
  • 何より回線速度(20倍〜50倍程度はやくなりましたw神速)
  • 新規申し込みならキャンペーンでかなりお得(Nuro光forマンションと、他の戸建やマンションミニではキャンペーン内容が違うので注意)
  • 個人的には、毎日のようにやっていたルーター再起動がなくなってかなりストレスなくなりましたw

ほぼほぼメリットしかなったです!Nuroすごすぎ。
デメリットとして唯一、所持している電話番号がナンバーポータビリティに対応している番号でなかったので、新規で新しい電話を取得しました。
また、問い合わせなどは結構混雑しているらしく中々つながらないので、最適なプランを探すのに時間をかけてしました。

もちろん、マンションの状況やwifi環境、使えるプランなどによって上記のようにならない可能性もありますが、個人的にはとても満足な切り替えができました。