GVKun编程网logo

安装了 firebase 模拟器,但它不起作用,仍然需要安装(fire dynamics simulator 教程)

24

本文将分享安装了firebase模拟器,但它不起作用,仍然需要安装的详细内容,并且还将对firedynamicssimulator教程进行详尽解释,此外,我们还将为大家带来关于android–Fire

本文将分享安装了 firebase 模拟器,但它不起作用,仍然需要安装的详细内容,并且还将对fire dynamics simulator 教程进行详尽解释,此外,我们还将为大家带来关于android – Firebase重置密码链接不起作用、API 在 Firebase 上部署后不起作用、axios.defaults.baseURL 不起作用,仍然缓存旧的 baseURL、Firebase A / b测试远程配置在发行版本中不起作用的相关知识,希望对你有所帮助。

本文目录一览:

安装了 firebase 模拟器,但它不起作用,仍然需要安装(fire dynamics simulator 教程)

安装了 firebase 模拟器,但它不起作用,仍然需要安装(fire dynamics simulator 教程)

如何解决安装了 firebase 模拟器,但它不起作用,仍然需要安装?

显然我曾经做过以下事情:

$ firebase login
$ firebase init
$ firebase init emulators

...skip

i  Port for functions already configured: 5001
i  Port for firestore already configured: 8080
i  Port for database already configured: 9000
i  Port for hosting already configured: 5000
i  Port for pubsub already configured: 8085
i  Emulator UI already enabled with port: (automatic)
? Would you like to download the emulators Now? Yes
i  ui: downloading ui-v1.4.1.zip...

i  Writing configuration info to firebase.json...
i  Writing project information to .firebaserc...

✔  Firebase initialization complete!

但是当我尝试 firebase emulators:start --only hosting:my_project_target_name 时,我收到以下消息。

$ firebase emulators:start --only hosting:my_project_target_name
i  emulators: Shutting down emulators.

Error: No emulators to start,run firebase init emulators to get started.

我的开发环境如下。

  • nodejs: v12.20.1
  • firebase:v9.3.0
  • java: openjdk v1.8.0_275
  • 操作系统:ubuntu 20.04

我在 sudo su 之后再次尝试,但结果是一样的。 我该怎么办?


添加内容。

它只适用于:

$ sudo firebase emulators:start --only hosting

i  emulators: Starting emulators: hosting
...
hosting[TARGET_NAME_!]: Local server: http://localhost:5000
...
hosting[TARGET_NAME_2]: Local server: http://localhost:5005

我只想测试托管一个项目。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

android – Firebase重置密码链接不起作用

android – Firebase重置密码链接不起作用

我正在使用firebase来验证我的Android应用程序中的用户.我向用户提供了在登录窗口中重置密码的选项.当用户点击按钮时,它会成功发送电子邮件.但是,当用户点击链接时,它始终显示

“请尝试重新设置密码.重置密码的请求已过期或链接已被使用”

enter image description here

谁知道我哪里错了?我尝试使用不同设备的不同电子邮件ID登录.还是行不通.我使用的是“com.google.firebase:firebase-auth:9.2.0”.

2016年8月31日更新

我与firebase支持联系,看起来有一些API密钥错误.如果您更改了浏览器API密钥,则无法更新.现在这个错误已修复,重置密码功能正常.

解决方法:

如果您在Google API console中列出了应用的API密钥的任何HTTP引荐来源,则需要包含电子邮件来源的应用本身:< app-name> .firebaseapp.com.否则,此域名对您的应用密钥无效.

API 在 Firebase 上部署后不起作用

API 在 Firebase 上部署后不起作用

如何解决API 在 Firebase 上部署后不起作用?

我创建了一个基于 react 框架的天气应用程序项目,该应用程序从 openweathermap..并部署在我的 firebase 托管平台上,但在部署后不仅无法正常工作,而且相同的 API 调用和代码在我的本地网络上完全成功运行,服务...
这是已部署的项目:CLICK
这是代码:

import React,{ useState } from ''react'';
import {imsearch,ImLocation2} from ''react-icons/im'';
import {AIoUtlineReload} from ''react-icons/ai'';
import {RiAlarmWarningLine} from ''react-icons/ri'';
import axios from ''axios'';
import ''./dataFetchStyle.css'';

function DataFetching(){
    const [place,setPlace] = useState('''');
    const [dataIN,setDataIN] = useState();
    const [fetchError,setFetchError] = useState(false);

    const APIKey = "/*my-key*/";
    const fetchData = (e) =>{
        e.preventDefault(); 
        axios.get(`http://api.openweathermap.org/data/2.5/weather?q=${place}&appid=${APIKey}`)
        .then(responce=>{
            setDataIN(responce)
            console.log(responce)
        })
        .catch(error=>{
            console.log(error)
            setFetchError(true)
        })
        setPlace('''')
    }
    const convertUTC = (UTC) =>{
        const fetchTime = new Date(UTC * 1000);
        const h = fetchTime.getHours();
        const m = fetchTime.getMinutes();
        return(h+":"+m)
    }
    if(!fetchError){
        return(
            <div className="ViewBox">
                <div className="SearchBox">
                    <form onSubmit={fetchData}>
                        <input
                            type="text"
                            value={place}
                            onChange={e=>{setPlace(e.target.value)}}
                            placeholder="Enter your place name..."/>
                        <button disabled={!place} type="submit"><imsearch/></button>
                    </form>
                </div>
                { dataIN ?
                    <div className="GotData">
                        <div className="showDataA">
                            <div className="NamePlace">
                                <h1>{dataIN.data.name}</h1>
                                <h2>{dataIN.data.sys.country}</h2>
                            </div>
                            <p>Geolocation : lon:{(dataIN.data.coord.lon).toFixed(1)} lat:{(dataIN.data.coord.lat).toFixed(1)}</p>
                            <p className="IMGP"><img src={`http://openweathermap.org/img/wn/${dataIN.data.weather[0].icon}@2x.png`} alt="Icon"/></p>
                            <p className="mainTemp">{(dataIN.data.main.temp - 273.15).toFixed(1)}<span>&#8451;</span></p>
                            <p className="mainTempF">{((dataIN.data.main.temp - 273.15) * 9/5 + 32).toFixed(1)}<span>&#8457;</span></p>
                        </div>
                        <div className="showDataB">
                            <p>min temp: {(dataIN.data.main.temp_min - 273.15).toFixed(1)}<span>&#8451;</span></p>
                            <p>max temp: {(dataIN.data.main.temp_max - 273.15).toFixed(1)}<span>&#8451;</span></p>
                            <p>humidity : {dataIN.data.main.humidity} %</p>
                            <p>pressure : {dataIN.data.main.pressure} hPa</p>
                            <p>visibility : {dataIN.data.visibility}  metres</p>
                            <p>wind speed : {dataIN.data.wind.speed} m/s</p>
                        </div>
                        <div className="showDataC">
                            <h3>Other information</h3>
                            <hr/>
                            <p>sea level : {dataIN.data.main.sea_level} hPa</p>
                            <p>grnd level : {dataIN.data.main.grnd_level} hPa</p>
                            <p>wind deg : {dataIN.data.wind.deg}<span>&#176;</span></p>
                            <p>wind gust : {dataIN.data.wind.gust} m/s</p>
                            <p>sunrise : {convertUTC(dataIN.data.sys.sunrise)}</p>
                            <p>sunset : {convertUTC(dataIN.data.sys.sunset)}</p>
                        </div>
                    </div> : <p className="msgNA"><ImLocation2 color="rgba(255,248,220,0.705)" size="50px"/></p>
                }
            </div> 
        )
    }
    else{
        return(
            <div className="OppsError">
                <p><RiAlarmWarningLine className="OppsErrorICON" size="35px"/></p>
                <p>
                Oops!,the place you have typed is not found <br/>
                so,please check your internet connection / the spelling or else we are sorry for your Inconvenience
                </p>
                <p><button onClick={()=>{setFetchError(!fetchError)}}><AIoUtlineReload size="25px"/></button></p>
            </div>
        )
    }
}

export default DataFetching;

解决方法

如果您打开浏览器控制台,您应该会看到确切的问题。 Firebase 服务器仅通过 HTTPS 提供内容,然后浏览器会阻止使用 HTTP 源。

enter image description here

将 URL 更改为 https 而不是 http

axios.defaults.baseURL 不起作用,仍然缓存旧的 baseURL

axios.defaults.baseURL 不起作用,仍然缓存旧的 baseURL

如何解决axios.defaults.baseURL 不起作用,仍然缓存旧的 baseURL?

我使用 Vue,在 main.js 中我全局设置了 baseURL

axios.defaults.baseURL = ''http://localhost:8080/'';

在路由中,我使用post方法

    Route::post(''categories/assign'',[CategoryController::class,''assign'']);

鉴于,我使用 vFormaxios

this.form
    .post(`api/staff/categories/assign/`,{})
    .then(() => {
      $(''#exampleModal'').modal(''hide''); // hide modal

      // sweet alert 2
      swal.fire({
        icon: ''success'',title: ''Category assigned successfully'',});

      this.GetCategories();
    })

但我得到了如下意想不到的奇怪结果:

enter image description here

为什么使用 get 方法时出现错误 405(不允许方法)?很明显我已经用 post 方法设置了请求。我做错了什么吗?

解决方法

看来,控制器中的路由和axios中的路由有点不同。尝试删除 axios url 请求末尾的 /。因此,现在 url 与控制器中的路由相同。然后,你可以走了!

Firebase A / b测试远程配置在发行版本中不起作用

Firebase A / b测试远程配置在发行版本中不起作用

如何解决Firebase A / b测试远程配置在发行版本中不起作用?

我是使用远程配置进行Firebase A / B测试的新手。我在远程配置中使用默认值0创建参数(SplashAds)。当我在保留天1的A / B测试中创建实验时,我更改了参数(SplashAds)1的值。对于第1天保留,当我从调试模式执行应用程序时,我在android studio上第1天保留的SplashAds值为1。很好,但是当我使用发布版本时,我的默认值为0表示A / B测试无法在发布版本中进行。请帮我 这是获取代码

 mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance();
    FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder()
            .setMinimumFetchIntervalInSeconds(3600)
            .build();
    mFirebaseRemoteConfig.setConfigSettingsAsync(configSettings);
    mFirebaseRemoteConfig.fetchAndActivate()
            .addOnCompleteListener(this,new OnCompleteListener<Boolean>() {
                @Override
                public void onComplete(@NonNull Task<Boolean> task) {
                    if (task.isSuccessful()) {
                        long SplashAdsdisable = mFirebaseRemoteConfig.getLong("SplashAdsdisable");
                        long Interstitialadsclick = mFirebaseRemoteConfig.getLong("Interstitialadsclick");
                        long RewardsAdsClick = mFirebaseRemoteConfig.getLong("RewardsAdsClick");
                        long WhatsWebAdsdisable = mFirebaseRemoteConfig.getLong("WhatsWebAdsdisable");
                        long Homescreennativeadsdisable = mFirebaseRemoteConfig.getLong("Homescreennativeadsdisable");
                        long Exitadsdisable = mFirebaseRemoteConfig.getLong("Exitadsdisable");                    
                    }
                }
            });

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

今天关于安装了 firebase 模拟器,但它不起作用,仍然需要安装fire dynamics simulator 教程的介绍到此结束,谢谢您的阅读,有关android – Firebase重置密码链接不起作用、API 在 Firebase 上部署后不起作用、axios.defaults.baseURL 不起作用,仍然缓存旧的 baseURL、Firebase A / b测试远程配置在发行版本中不起作用等更多相关知识的信息可以在本站进行查询。

本文标签: