묻고 답해요
129만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결핸즈온 리액트 네이티브
FirebaseError: auth/already-initialized
안녕하세요, 8강 끝부분을 따라가고 있는 중입니다. 프로젝트에서 npm start 해놓고 expo go 어플로 실시간으로 확인하면서 작업을 진행 중인데요, 새로고침 할 때(r눌러서)는 괜찮은데, VS Code에서 저장을 해서 자동으로 리랜더링 될때마다 아래와 같은 에러 메세지가 콘솔 창에 나타납니다.[FirebaseError: Firebase: Error (auth/already-initialized).] 특별히 뭐가 안되거나 하는건 아닌데... r 눌러서 아예 앱을 새로고침하면 뜨지않습니다. 어디선가 중복으로 초기화하고있다는 뜻일까요? firebase.js 파일 코드 첨부합니다! 추가로 보여드려야 하는 다른 코드가 있다면 말씀 부탁드립니다. screen 부분은 제가 다르게 가져가고 있는데 이 외에 기능부분에 대한 것들은 강의와 동일하게 진행 중입니다. firebase.jsimport { initializeApp } from 'firebase/app'; import { firebaseConfig } from '../../env'; import { getReactNativePersistence, initializeAuth } from 'firebase/auth'; import AsyncStorage from '@react-native-async-storage/async-storage'; export const initFirebase = () => { // Initialize Firebase try { const app = initializeApp(firebaseConfig); initializeAuth(app, { persistence: getReactNativePersistence(AsyncStorage), }); return app; } catch (e) { // eslint-disable-next-line no-console console.error(e); } };
-
미해결
구글 플레이 콘솔의 주문관리 데이터를 가져오지 못합니다.
현재 배포되어 있는 앱이 있는데 결제를 할 때마다 파이어베이스에 추가 되게끔 firebase function을 설정해놨습니다. 기존에는 별 문제 없이 잘 됐다가 play-console 계정을 다른 계정으로 소유권 이전을 한 이후로 The current user has insufficient permissions to perform the requested operation.라는 메시지와 함께 추가가 되질 않습니다.firebase function에서도 play console 계정을 업데이트 해서 배포를 했고, gcp에서도 새 계정의 IAM을 최상으로 올려놓은거 같은데 계속 같은 이유로 데이터를 가져오지 못하고 있습니다.제가 어딜 놓치고 있는걸까요?
-
미해결
onSnapshot 함수 unsubscribe 에 대해서 질문이 있습니다
제가 궁금한건 다른 페이지에 있을 때에도 스냅샷 함수를 가동시켜 비용이 계속해서 발생하는 것을 막기위해 온스냅샷 함수를 unsubscribe, 구독취소하는 코드인데요어째서 제가 읽기에는 unsubscribe = ~ 온스냅샷함수 ~...return () => unsubscribe함수 실행useEffect cleanup기능으로 언마운트시 온스냅샷함수를 정지하려는데 다시 온스냅샷함수를 실행? 제가 어떻게 잘못 이해하는건지 모르겠어요 .. ㅠㅠexport default function Timeline() { const [tweets, setTweet] = useState<ITweet[]>([]); let unsubscribe: Unsubscribe | null = null; const fetchTweets = async () => { const tweetsQuery = query( collection(db, "tweets"), orderBy("createdAt", "desc"), limit(25) ); unsubscribe = await onSnapshot(tweetsQuery, (snapshot) => { const tweets = snapshot.docs.map((doc) => { const { tweet, createdAt, userId, username, photo } = doc.data(); return { tweet, createdAt, userId, username, photo, id: doc.id, }; }); setTweet(tweets); }); }; useEffect(() => { fetchTweets(); return () => { unsubscribe && unsubscribe(); }; }, []); }
-
미해결Flutter 입문 - 안드로이드, iOS 개발을 한 번에 (with Firebase)
firebase option 오류
- 안녕하세요. firebase를 사용하는 12강을 보고 따라하던 도중에 이런 에러가 발생했습니다. 재설치를 해도 init을 해서 초기화를 해도 해결이 되지 않네요. 설치후 바로 들어가는 도입부분이라 더 아리쏭합니다.
-
해결됨풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기
firebase filterling 관련 질문
안녕하세요 재남쌤~~ 어렵지만 헤매고 구글링 하면서 어찌저찌 따라하고 있는데 , 무한 스크롤링 + firebase 관련 애러가 발생해, 질문이 있어서 게시글 남깁니다.DB 데이터 수를 Limit 보다 줄이고 실행했을 때, data에 다음 게시물이 아닌, 처음 게시물부터 push로 추가되는 문제가 발생했습니다 ㅠㅠ 제가 중간에 이것저것 기능을 넣었는데 ( 삭제된 게시물만 보여주기, 모두 보여주기 등등 ) 여기서 오류가 난 것이라 생각했는데, jsonDB로 실행했을 때는 문제가 없어서, firebase에서 cursor 로 받아오는 고유값 다음 게시물을 잡아내지 못해 발생된 오류 같습니다 ㅠㅠ firebase 공홈 문서를 봐도 잘 이해가 가지않아 글 남깁니다.공홈 Ref : https://firebase.google.com/docs/firestore/query-data/query-cursors?hl=ko#web-version-9_1지금 작성된 코드를 보면, const queryOptions: any[] = [orderBy("createdAt", "desc")]; if (cursor) queryOptions.push(startAfter(cursor));이 형태로 작성되어 있는데, 공홈에 따르면 orderBy의 필드인 createdAt이 가진 값에서, startAfter 값부터 시작되는 것 같은데, 저희가 cursor로 가진 값은 문서 ID인데, 이 값을 기준으로 startAter를 잡는 방법이 있을까요?
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
에뮬레이터가 에러가 나는 경우는 어떤 문제인가요
bts 어플 만들기에서 bts_1 파일까지는 잘 됐는데액티비티 화면 전환을 시도할려고 코드를 짜다보니다른 이미지를 선택했을때 자꾸 바탕화면으로 튕기고 계속 시도하니 오류가 납니다 나머지 이미지 파일이나 레이아웃 코드는 모두 복붙했고 메인 액티비티도 코드는 강의내용 그대로 옮겨 적었습니다
-
해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
isEmpty가 unresolved references 오류
isEmpty함수를 따라 쓰려 하자 unresolved references 오류가 발생하며 사용할 수 없어서 대체로 length가 0인 것을 하려고 하자 노란줄이 뜨면서 isEmpty를 추천해주는데 여전히 사용이 안되는데 혹시 왜 그런지 아시나요?
-
미해결너네 백엔드 하고 싶은 거 있으면 얼마든지 해 난 괜찮어 왜냐면 나는 파이어베이스가 있어
next js 에는 browserRouter가 없어서 상태에 맞는 화면을 어떻게 노출하나요?
next js 에는 browserRouter가 없어서 상태에 맞는 화면을 어떻게 노출하나요?로그인 전후에 따라서 표시하는 페이지를 어떻게 비슷하게 만들 수 있는지 궁금합니다.
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
메타데이터 에러
안녕하세요.이미지 세팅하고 시작 누르는데 맨 밑과 같은 에러가 나오는데요. 아래 2가지 방법을 시도해도 작동이 안되는데 혹시 어떻게 해야 하나요? } https://devshin93.tistory.com/116 참조:-> 첫 번재 해결책 : compileSdk 와 targetSdk 가 31이 아닌 경우,implementation 'androidx.appcompat:appcompat:1.3.0'> 두 번째 해결책 : compileSdk 과 targetSdk 가 31인 경우 걍 해결 됨! AAR 메타데이터를 확인하는 동안 6가지 문제가 발견되었습니다:
-
해결됨[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)
firebase 관련 import에서 오류가 발생합니다
auth 부분에서도 import가 되지 않는 오류가 발생했는데 이전에는 방법을 찾아서 무시하고 일단 넘어갔는데 realtime database에서도 여전히 문제가 발생합니다.다음과 같이 Firebase를 import하려고 하면 Unresolved reference:Firebase라고 뜹니다. import 선택지는 뜨지도 않고요.. 이전에 auth에서도 동일한 문제가 발생했는데 어떻게 고치고 왜 그런지 아시나요? implementation도 추가했습니다
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
강의자료와 소스코드는 어디서 받을수 있나요?
강의 제목 옆에 구름 아이콘이나 수업자료 버튼이 보이지 않습니다ㅠ
-
미해결따라하며 배우는 리액트, 파이어베이스 - 채팅 어플리케이션 만들기[2023.12 리뉴얼]
파이어스토어에서 db 값 가져오기 테스트 중...에러
코드샌드박스에서 작성중인 데이터입니다.https://codesandbox.io/s/upbeat-jasper-gfb978?file=/src/App.js:0-563 import "./styles.css";import { db } from "./firebase";import { doc, onSnapshot } export default function App() { const unsub = onSnapshot(doc(db, "cities", "SF"), (doc) => { let word = "hsdsi"; console.log("Current data: ", doc.data().name); word = doc.data().name; }); //word = unsub.name; return ( <div> <p> {word} </p> </div> ); // Add a new document in collection "cities"} word 변수를 선언해서 return 값으로 word 변수를 받아서 rendering 하려고 합니다. onSnapshot( ) 안에서 let word = "" ;으로 초기 변수 설정을 해주지 않으면, 에러가 계속 뜨더라구요.어쩔수없이 이렇게 선언해서 return 값에서 불러왔는데, 렌더링은 잘되지만, 코드 자체는 에러가 뜹니다.제가 볼때도 const 내부에서 선언하면 호이스팅이 안되기때문에 변수 초기화가 안되서 이렇게 하면 안될것 같지만, 일단 렌더링이 되긴하네요. 근데 코드상에서는 빨간줄이 밑줄 그어지면서잘못 코드한것처럼 에러가 나는것 같습니다.어떻게 해줘야할까요?
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
FireBase 익명로그인 실패
강사님 말씀대로 했는데 익명 로그인 부분에서 else(익명로그인 실패)부분이 뜨네요
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
에러코드
Run 돌리면 자꾸 에러가 떠서 그냥 아무 코드 입력없이 새 프로젝트를 만들어 돌려도 다음과 같은 에러코드가 뜹니다. 원인이 무엇일까요?? 6 issues were found when checking AAR metadata: 1. Dependency 'androidx.appcompat:appcompat-resources:1.6.1' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 2. Dependency 'androidx.appcompat:appcompat:1.6.1' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 3. Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 4. Dependency 'androidx.core:core:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 5. Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 6. Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).
-
해결됨풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기
204 error 문제
안녕하세요 재남님!배포 과정에서 문제가 있어 질문 드립니다~현재 상황은 heroku에 깃 연동을 통해 배포를 한 상태입니다.그렇기 때문에 herokuURL/graphql 을 입력하면 studio.apollographql.com에서 날리는 api test도 잘 동작하고 있습니다.그런데 vercel로 배포한 페이지에서는 products 화면을 제외한 cart, admin 같은 경우는 204 error가 뜨고 있는 상황입니다. 검색을 해보니 컨텐츠를 보여줄 필요가 없다(?) 라고 나오는데 어떤 문제인지 잘모르겠습니다.. ㅜ
-
해결됨풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기
server 실행 오류가 납니다.
https://github.com/JaeHyuk1217/JH_mall/tree/master/shopping-mall server을 실행하면 이러한 오류가뜹니다... 환경변수 설정도 해보고 node 재설치도 해봤는데 되지 않습니다..
-
해결됨풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기
4일차 장바구니에서 오류가 납니다.
안녕하세요 4일차 공부를 하던중 willpay를 cart 에서 밖으로 꺼내 willpay-index.tsx 로 변경하게 되면서 이러한 오류가 뜨면서 장바구니가 담아지지 않습니다.(장바구니가 비어있을 때는 비어있다는 텍스트는 출력이됩니다) 코드상 오류 표시는 안나는데 해결이 안되서 여쭤봅니다. 감사합니다.
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
이 강의를 듣고 JETPACK 개론 강의로 넘어가도 괜찮을까요?
https://www.inflearn.com/questions/760208/comment/237501여기서 알려주신데로 다른 곳에서 Room을 이용하여 만드는 메모장 앱을 따라 만들어봤는데바인딩같은 개념을 잘 모르니까 따라해도 이해가 안가고 어렵더라구요 ..왕초보편 듣고 바로 제트팩 개론 강의로 넘어가도 될까요 ??
-
해결됨풀스택 리액트 라이브코딩 - 간단한 쇼핑몰 만들기
body : ReadableStream 관련 문의드립니다.
안녕하세요. 2강 진행 중 상품목록 조회시 msw Response 결과에 대한 body 값이 ReadableStream 으로 넘어옵니다.이 경우 body 의 data를 확인할 방법이 있을까요?답변 부탁드립니다.감사합니다.
-
미해결[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)
지금 버전에서는 Device Manager맞나요?
말씀하시는 게 없습니다.