Good afternoon everyone,
When I go to OpenFPL and navigate to a sub page like /pick-team and hit refresh I get this error:
I feel like it’s something to do with my auth context:
import React, { useState, useEffect } from 'react';
import { AuthClient } from "@dfinity/auth-client";
export const AuthContext = React.createContext();
export const AuthProvider = ({ children }) => {
const [authClient, setAuthClient] = useState(null);
const [isAuthenticated, setIsAuthenticated] = useState(false);
const [userPrincipal, setUserPrincipal] = useState("");
const [loading, setLoading] = useState(true);
const [initialized, setInitialized] = useState(false);
useEffect(() => {
const initAuthClient = async () => {
try{
const authClient = await AuthClient.create({
idleOptions: {
idleTimeout: 1000 * 60 * 60
}
});
This file has been truncated. show original
But I’ve made it match another project of mine and that one has no issues.
OpenFPL domain:
https://bgpwv-eqaaa-aaaal-qb6eq-cai.icp0.io/
Any help would be appreciated.
Hey @jamesbeadle , unfortunately you’ve deployed your assets with a version of DFX that that has a bug in how it handles certification for fallback routes, which is every route except for "/" when you’re writing a single page application.
If you upgrade DFX and then deploy again this should fix the issue for you.
Thank you so much.
Literally just had to run dfx update.
Wish I’d asked 6 hours ago.
Put the forum on speed dial for next time