NativeScript / NativeScript/plugins

@nativescript/google-signin Configure Placement

オープン
#510 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
206
フォーク
123
平均マージ
2日 1時間
マージ済み PR(30日)
1

説明

From the comment and past experiences I figured the configure method needed to be called in main.ts.
https://github.com/NativeScript/plugins/issues/492#issuecomment-1547155963

Also be sure you have called configure in main.ts (or app.ts depending on project type), eg:

import { GoogleSignin } from '@nativescript/google-signin';

GoogleSignin.configure();

This results in a error
GoogleSignin configuration error: Error: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter activity

and a GoogleSignin.signIn() error of
.signIn Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Intent.migrateExtraStreamToClipData(android.content.Context)' on a null object reference

Putting the configure in a component or service after main.ts, still ensuring it's called only once, fixes this but it conflicts with @NathanWalker's recommendation

Examples made from ns create example-app --ng:
https://github.com/NicholasSmilovic/nativescript-google-signin-demo -> master broken
https://github.com/NicholasSmilovic/nativescript-google-signin-demo/pull/1 -> working

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue に記載されているエントリポイント main.ts/app.ts と @nativescript/google-signin の configure および signIn 呼び出しから始めます。壊れている例をリンク先の動作する pull request と比較し、推奨されるエントリポイントから設定することで Android エラーが発生しなくなり、signIn が成功することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, typescript
領域
authentication, mobile
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。